Modify

Opened 4 years ago

Closed 3 years ago

#8339 closed defect (fixed)

[patch] Unable to see link "Ticket Template"

Reported by: anonymous Owned by: richard
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 4 years ago by richard

  • Status changed from new to assigned

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

comment:2 Changed 3 years ago by anonymous

me too

comment:3 Changed 3 years ago by hasienda

  • Keywords permission added
  • Summary changed from Unable to see link "Ticket Template" to [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 3 years ago by hasienda

  • Keywords trivial added
  • Priority changed from normal to high

pushing this a bit more

comment:5 Changed 3 years ago by hasienda

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 3 years ago by hasienda

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 3 years ago by hasienda

  • Resolution set to fixed
  • Status changed from assigned to closed

(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.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from richard. Next status will be 'closed'.
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.