#12583 closed defect (fixed)
Hide rule does not work when the user group has only the TICKET_VIEW permission
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Component: | DynamicFieldsPlugin |
Severity: | normal | Keywords: | permissions |
Cc: | Trac Release: | 0.11 |
Description
Do not know exactly if it is a defect, but "show_if_group" rule does not work as expected.
Users in groups with the TICKET_VIEW permission can still view all the fields. Only users in groups with the TICKET_MODIFY permission have fields hidden (correctly based on the rule).
my installation: trac 0.11rc1 with no other plugin than DynamicFieldsPlugin.
btw: thank you for this plugin.
Attachments (0)
Change History (8)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
Owner: | changed from Rob Guttman to Ryan J Ollos |
---|---|
Status: | new → accepted |
Confirmed. The issue is that the rules are applied to input elements, and the ticket properties are hidden as a side-effect of applying the rules to input elements. When a user has TICKET_VIEW
but not TICKET_MODIFY
there are no input elements and the rules are skipped.
comment:3 Changed 9 years ago by
Should be fixed with the next commit, but the issue in #12575 is still causing problems during autopreview.
comment:5 Changed 9 years ago by
Keywords: | 0.11 fields removed |
---|
Thanks again for the report. Note that you'll need to upgrade to Trac 0.12 or later, preferably to Trac 1.0.9 (the latest stable release), and install DynamicFieldsPlugin from dynamicfieldsplugin/trunk.
comment:6 Changed 9 years ago by
Thank you rjollos for your time. I upgraded trac to 1.0.9 and now I'm testing the plugin. It works fine, but I think there is a little oversight at
source:dynamicfieldsplugin/trunk/dynfields/htdocs/rules.js@15096#L175
if (input.attr('id') !== undefined)
This breaks the hide rule when inputs are hidden.
I think it should be
if (input.attr('id') === undefined)
I'll check the behavior with Trac 1.0, however Trac 0.11.x is no longer supported. Trac 0.11rc1 was released 8 years ago and I highly advise against running such an old version of Trac.