Modify ↓
Opened 12 years ago
Closed 9 years ago
#11751 closed enhancement (fixed)
Allow TICKET_ADMIN permission to use the Plugin
| Reported by: | Sergio Talens-Oliag | Owned by: | ejucovy |
|---|---|---|---|
| Priority: | normal | Component: | WorkflowNotificationPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 1.0 |
Description
In our trac installation we don't give TRAC_ADMIN permission to all the project managers, but with your current code that is the only way of allowing them to configure the notifications via web.
I've patched your code to allow users with TICKET_ADMIN permission to configure this plugin.
Please consider adding it to your repo.
Thanks in advance.
Attachments (1)
Change History (5)
Changed 12 years ago by
| Attachment: | trac-WorkflowNotificationPlugin-ticket_admin_perm.patch added |
|---|
comment:1 Changed 12 years ago by
It isn't necessary to implement IPermissionRequestor. The permission is already defined in Trac. Also, anyone with TRAC_ADMIN will possess TICKET_ADMIN, so the only change you should need is:
-if req.perm.has_permission('TRAC_ADMIN'): +if req.perm.has_permission('TICKET_ADMIN'):
comment:2 Changed 9 years ago by
| Status: | new → accepted |
|---|
comment:3 Changed 9 years ago by
if 'TICKET_ADMIN' in req.perm('admin', 'ticket/workflow_notification'):
would be better to support TracFineGrainedPermissions. I'll create a pull request.
comment:4 Changed 9 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
Note: See
TracTickets for help on using
tickets.



Patch