Opened 6 years ago

Closed 6 years ago

#3673 closed enhancement (invalid)

When the user have permission TRAC_ADMIN, the fields hidden didn't display for him.

Reported by: diorgenes Owned by: coderanger
Priority: normal Component: SimpleTicketPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


I do correction in code plugin, patch attached.

Attachments (1)

diff (1.2 KB) - added by diorgenes 6 years ago.

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by diorgenes

comment:1 Changed 6 years ago by diorgenes

I didn't achieve attach the file in ticket.

---   2008-09-05 10:32:34.000000000 -0300
+++       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):
\ No newline at end of file

comment:2 Changed 6 years ago by coderanger

  • Resolution set to invalid
  • Status changed from new to 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.

Add Comment

Modify Ticket

as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from coderanger. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.