Modify

Opened 14 years ago

Closed 14 years ago

#8339 closed defect (fixed)

[patch] Unable to see link "Ticket Template"

Reported by: anonymous Owned by: Richard Liao
Priority: high Component: TracTicketTemplatePlugin
Severity: normal Keywords: trivial permission
Cc: Trac Release: 0.12

Description

I have installed it as I did for other plugins(that work fine). building from 0.11/ source. adding egg file to plugins/ . in trac.ini: enabled component tickettemplate.*. added [tickettemplate].... restarting apache. Unable to see the link Ticket Template. Please help Thanks

Attachments (0)

Change History (7)

comment:1 Changed 14 years ago by Richard Liao

Status: newassigned

You can check if simplejson is installed first. If yes, look up at trac's log file can get more information.

comment:2 Changed 14 years ago by anonymous

me too

comment:3 Changed 14 years ago by Steffen Hoffmann

Keywords: permission added
Summary: Unable to see link "Ticket Template"[patch] Unable to see link "Ticket Template"

This is related to assigning a wrong permission.

I've found this issue with 0.6 and it continued when upgrading to 0.7 once more today. So I just went on to get it fixed. Following small patch provides the intended behavior - show the admin page with 'Ticket Template' view for any user with TT_ADMIN permission, (or another admin page and a 'Ticket Template' link, if user has more admin permissions):

@@ -133,7 +133,7 @@
 
     # IAdminPanelProvider methods
     def get_admin_panels(self, req):
-        if 'TT_ADMIN' in req.perm:
+        if 'TRAC_ADMIN' in req.perm:
             yield ('ticket', _('Ticket System'), 'tickettemplate', _('Ticket Template'))
 
     def render_admin_panel(self, req, cat, page, path_info):

Again, this should really be fixed at least for TracTicketTemplatePlugin 0.6 and 0.7, since these versions are know to be affected in a way, that the TT_ADMIN permission is rendered useless and only users with TRAC_ADMIN (that implicitly collects all permission anyway) are able to access the admin page.

comment:4 Changed 14 years ago by Steffen Hoffmann

Keywords: trivial added
Priority: normalhigh

pushing this a bit more

comment:5 Changed 14 years ago by Steffen Hoffmann

Uh, very sorry, the previous patch is actually just the other way around:

@@ -133,7 +133,7 @@
 
     # IAdminPanelProvider methods
     def get_admin_panels(self, req):
-        if 'TRAC_ADMIN' in req.perm:
+        if 'TT_ADMIN' in req.perm:
             yield ('ticket', _('Ticket System'), 'tickettemplate', _('Ticket Template'))
 
     def render_admin_panel(self, req, cat, page, path_info):

comment:6 Changed 14 years ago by Steffen Hoffmann

See #8609 for a follow-up on permissions, that proposes an second permission to better control the "my templates" selection instead of just 'all-or-nothing'.

comment:7 Changed 14 years ago by Steffen Hoffmann

Resolution: fixed
Status: assignedclosed

(In [9956]) Fixed #8609 , add permission TT_USER to fine grained control user custom templates

As mentioned there, this should fix the original problem here as well. Anyone having still problems should re-open this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Richard Liao.
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.