Opened 4 years ago

Closed 4 years ago

support permission handling

Reported by: Owned by: falkb falkb normal SimpleMultiProjectPlugin normal planned crossroad, thomasd, rjollos 0.11

Description

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

comment:2 Changed 4 years ago by anonymous

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

comment:3 follow-up: ↓ 4 Changed 4 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 4 years ago by falkb

• Status changed from new to assigned

It looks correct to me. Two minor comments:

Thanks for checking :-)

comment:5 follow-up: ↓ 7 Changed 4 years ago by falkb

TODO maybe also PROJECT_LIST is needed

comment:6 Changed 4 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 4 years ago by 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 4 years ago by falkb

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