Modify

Opened 9 years ago

Closed 8 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)

diff (1.2 KB) - added by Diorgenes Felipe Grzesiuk 9 years ago.

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by Diorgenes Felipe Grzesiuk

Attachment: diff added

comment:1 Changed 9 years ago by Diorgenes Felipe Grzesiuk

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']

comment:2 Changed 8 years ago by Noah Kantrowitz

Resolution: invalid
Status: newclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.