Modify ↓
Opened 13 years ago
Closed 8 years ago
#9853 closed enhancement (wontfix)
[Patch] Make everyone use the simple form
Reported by: | HumanInternals | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | SimpleTicketPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
Currently, its impossible for TRAC_ADMIN users to use the simple ticket form. In some cases, it is desirable for all users, including admins, to see the shorter form.
This adds a new everyone
option to the configuration, that makes it ignore permissions completely and make everyone use the simple form:
-
simpleticket/web_ui.py
15 15 show_only = BoolOption('simpleticket', 'show_only', default=False, 16 16 doc='If True, show only the specified fields rather than hiding the specified fields') 17 17 18 everyone = BoolOption('simpleticket', 'everyone', default=False, 19 doc='If true, effect everyone regardless of permissions.') 20 18 21 implements(IRequestFilter, IPermissionRequestor) 19 22 20 23 # IRequestFilter methods … … 23 26 24 27 def post_process_request(self, req, template, data, content_type): 25 28 if req.path_info == '/newticket': 26 do_filter = 'TICKET_CREATE_SIMPLE' in req.perm and not 'TRAC_ADMIN' in req.perm29 do_filter = self.everyone or ('TICKET_CREATE_SIMPLE' in req.perm and not 'TRAC_ADMIN' in req.perm) 27 30 28 31 self.log.debug('SimpleTicket: Filtering new ticket form for %s', req.authname) 29 32 if do_filter:
Attachments (0)
Change History (3)
comment:1 Changed 13 years ago by
Summary: | Make everyone use the simple form → [Patch] Make everyone use the simple form |
---|
comment:2 Changed 9 years ago by
Type: | defect → enhancement |
---|
comment:3 Changed 8 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
This has a pretty narrow use case so I'm not going to apply the patch unless anyone else is still interested in it.
Note: See
TracTickets for help on using
tickets.
Thanks for the patch. It looks good. I'd like to change the name of the TracIni configuration option, but otherwise will apply the patch as is. It will probably be a week or two since I'm very busy at the moment.