#13322 closed defect (fixed)
Operation on unwanted places
Reported by: | ntmlod | Owned by: | jomae |
---|---|---|---|
Priority: | normal | Component: | GridModifyPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description (last modified by )
The plugin has a little tendency to work on other tables, for example the history of a wiki page where the version numbers are replaced by dropdown menu with code versions.
Perhaps the best way to handle this is to limit to /query
& /report
href pages and tables generated with [[TicketQuery()]]
.
Attachments (3)
Change History (15)
comment:1 Changed 7 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 7 years ago by
comment:3 follow-up: 5 Changed 7 years ago by
Also, the plugin doesn't work on the table generated by TicketQuery
macro.
comment:5 follow-up: 8 Changed 7 years ago by
-
gridmodifyplugin/trunk/gridmod/web_ui.py
33 33 # IPermissionRequestor methods 34 34 35 35 def get_permission_actions(self): 36 yield 'TICKET_ GRID_MODIFY'36 yield 'TICKET_ADMIN', ['TICKET_GRID_MODIFY'] 37 37 38 38 # ITemplateProvider methods 39 39 … … 51 51 52 52 def process_request(self, req): 53 53 try: 54 if 'TICKET_ ADMIN' in req.perm or 'TICKET_GRID_MODIFY' in req.perm:54 if 'TICKET_GRID_MODIFY' in req.perm: 55 55 56 56 id = as_int(req.args.get('ticket'), None) 57 57 ticket = Ticket(self.env, id) … … 122 122 # tag values. JQuery then uses this information to update the 123 123 # relevant fields on the page. 124 124 if filename in ('query.html', 'report_view.html') and \ 125 'TICKET_ADMIN' in req.perm or \126 125 'TICKET_GRID_MODIFY' in req.perm: 127 126 add_script(req, 'gridmod/gridmod.js') 128 127 div = html.div(id='table_inits_holder', style='display:none;')
The version history for wiki pages has been restored.
I think I encountered the problem in another page but I can't remember which. Probably this fix solves it.
Replying to Jun Omae:
Also, the plugin doesn't work on the table generated by
TicketQuery
macro.
I didn't try to change a field trough this but I see dropdown menus fro TicketQuery
tables
comment:6 Changed 7 years ago by
After review TICKET_GRID_MODIFY
is no longer in the permissions list, the first change shouldn't it be:
-
gridmod/web_ui.py
33 33 # IPermissionRequestor methods 34 34 35 35 def get_permission_actions(self): 36 yield 'TICKET_GRID_MODIFY'36 return [('TICKET_ADMIN', ['TICKET_GRID_MODIFY']), 'TICKET_GRID_MODIFY'] 37 37 38 38 # ITemplateProvider methods
Changed 7 years ago by
Attachment: | admin-permissions.png added |
---|
Changed 7 years ago by
Attachment: | console-permissions.png added |
---|
comment:8 follow-up: 9 Changed 7 years ago by
Changed 7 years ago by
Attachment: | Missing_grid_perm.png added |
---|
comment:9 Changed 7 years ago by
Replying to Jun Omae:
Replying to Jun Omae:
Also, the plugin doesn't work on the table generated by
TicketQuery
macro.I didn't try to change a field trough this but I see dropdown menus fro
TicketQuery
tablesNo. That is unintentional behavior which is probably introduced in [16202].
You're right, it's no longer the case now.
Back to permission issue, my screenshot is not very good but you can see the permission TICKET_GRID_MODIFY
is grey and with some heed not in the list from the dropdown menu.
comment:11 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:12 Changed 7 years ago by
Owner: | changed from Ryan J Ollos to jomae |
---|
Root cause is the following expression in filter_stream().
It should be:
However, it would be simplified to group
TICKET_GRID_MODIFY
inTICKET_ADMIN
.gridmodifyplugin/trunk/gridmod/web_ui.py
ADMIN' in req.perm or 'TICKET_GRID_MODIFY' in req.perm:'TICKET_ADMIN' in req.perm or \Could you please try it?