Modify

Opened 3 years ago

Closed 2 years ago

#10096 closed enhancement (fixed)

support permission handling

Reported by: falkb Owned by: falkb
Priority: normal Component: SimpleMultiProjectPlugin
Severity: normal Keywords: planned
Cc: crossroad, thomasd, rjollos Trac Release: 0.11

Description

at least we need PROJECT_ADMIN to hide the project editor for normal users

Attachments (0)

Change History (8)

comment:1 Changed 3 years ago by falkb

(In [11641]) refs #10096: support PROJECT_ADMIN, check it in get_admin_panels() and render_admin_panel()

comment:2 Changed 3 years ago by anonymous

  • Cc rjollos added

Ryan, I hope this was the right way, though somehow I didn't find an example for has_permission()

comment:3 follow-up: Changed 3 years ago by rjollos

It looks correct to me. Two minor comments:

  • I'm not sure that specifying the realm in req.perm('projects') has any effect, but I'm still trying to understand the consequences of specifying a realm / resource. If it does have an effect, you might similarly want to specify req.perm('projects').require('PROJECT_ADMIN') in place of req.perm.require('PROJECT_ADMIN').
  • You might want to allow the page label to be translated, as you've already done for the category label:
yield ('projects', _('Manage Projects'), 'simplemultiproject', 'Projects') 

->

yield ('projects', _('Manage Projects'), 'simplemultiproject', _('Projects'))

comment:4 in reply to: ↑ 3 Changed 3 years ago by falkb

  • Status changed from new to assigned

Replying to rjollos:

It looks correct to me. Two minor comments:

Thanks for checking :-)

comment:5 follow-up: Changed 2 years ago by falkb

TODO: maybe also PROJECT_LIST is needed

comment:6 Changed 2 years ago by falkb

(In [11713]) Refs #10096: now users with PROJECT_SETTINGS_VIEW can read the project name lists, the project info and their component assignments on the Admin panel

comment:7 in reply to: ↑ 5 Changed 2 years ago by falkb

  • Keywords testing added

Replying to falkb:

TODO: maybe also PROJECT_LIST is needed

PROJECT_SETTINGS_VIEW seemed to be more appropriate to what it does. All trials to change the project settings end up with PROJECT_ADMIN privileges are required to perform this operation with just PROJECT_SETTINGS_VIEW.

Before closing I set this ticket to testing state now.

comment:8 Changed 2 years ago by falkb

  • Keywords testing removed
  • Resolution set to fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Action
as closed The owner will remain falkb.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.