Ticket #8339 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

[patch] Unable to see link "Ticket Template"

Reported by: anonymous Assigned to: 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

Change History

12/24/10 01:49:00 changed 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.

02/24/11 07:01:47 changed by anonymous

me too

03/15/11 22:24:33 changed by hasienda

  • keywords set to permission.
  • 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.

03/15/11 22:25:05 changed by hasienda

  • priority changed from normal to high.
  • keywords changed from permission to trivial permission.

pushing this a bit more

03/15/11 23:33:31 changed 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):

03/15/11 23:53:37 changed 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'.

03/17/11 04:59:50 changed by hasienda

  • status changed from assigned to closed.
  • resolution set to fixed.

(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/Change #8339 ([patch] Unable to see link "Ticket Template")




Change Properties
Action