Modify

Opened 10 years ago

Closed 8 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)

trac-WorkflowNotificationPlugin-ticket_admin_perm.patch (1.6 KB) - added by Sergio Talens-Oliag 10 years ago.
Patch

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by Sergio Talens-Oliag

Patch

comment:1 Changed 10 years ago by Ryan J Ollos

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 8 years ago by ejucovy

Status: newaccepted

comment:3 Changed 8 years ago by Ryan J Ollos

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 8 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

Fixed in 8dd98b67 and 0db6be7f.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain ejucovy.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.