Modify ↓
Opened 17 years ago
Closed 17 years ago
#3673 closed enhancement (invalid)
When the user have permission TRAC_ADMIN, the fields hidden didn't display for him.
| Reported by: | Diorgenes Felipe Grzesiuk | Owned by: | Noah Kantrowitz |
|---|---|---|---|
| Priority: | normal | Component: | SimpleTicketPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 0.11 |
Description
I do correction in code plugin, patch attached.
Attachments (1)
Change History (3)
Changed 17 years ago by
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
Not a bug, the UI for the override system is not added. For now you can manually set the simpleticket.do_filter session value using SQL.
Note: See
TracTickets for help on using
tickets.



I didn't achieve attach the file in ticket.
--- web_ui.py 2008-09-05 10:32:34.000000000 -0300 +++ web_ui.py.new 2008-09-05 10:32:25.000000000 -0300 @@ -25,13 +25,14 @@ def post_process_request(self, req, template, data, content_type): if req.path_info == '/newticket': do_filter = req.perm.has_permission('TICKET_CREATE_SIMPLE') + user_admin = req.perm.has_permission('TRAC_ADMIN') # Should we allow a session override? allow_override = self.allow_override or req.perm.has_permission('TRAC_ADMIN') if allow_override: do_filter = req.session.get('simpleticket.do_filter', do_filter) - if do_filter: + if do_filter and user_admin==False: hide_fields = set(self.hide_fields) self.log.debug('SimpleTicket: Filtering new ticket form for %s', req.authname) data['fields'] = [f for f in data['fields'] if f['name'] not in hide_fields] @@ -40,4 +41,4 @@ # IPermissionRequestor methods def get_permission_actions(self): - yield 'TICKET_CREATE_SIMPLE', ['TICKET_CREATE'] \ No newline at end of file + yield 'TICKET_CREATE_SIMPLE', ['TICKET_CREATE']