On table views containing a Weight field displayed as a form element, users with the "assign node weights" permission will correctly see a draggable table:
However, users without the "assign node weights" permission still see the form submit button, as well as an empty column in the table:
(The empty column remains visible even when "Hide empty column" is selected in the view's style options.)
I believe this issue is due to the "assign node weights" access control being applied only to the weight-selection form fields, rather than to the entire views field handler. I've attached a patch that does the latter, removing the unwanted submit button and table column for users without the "assign node weights" permission:
When testing, be sure to clear all caches after applying the patch.
| Comment | File | Size | Author |
|---|---|---|---|
| weight-view-field_no-permission_w-patch.PNG | 6.44 KB | eromba | |
| weight-view-field_no-permission.PNG | 8.66 KB | eromba | |
| weight-view-field_with-permission.PNG | 10.26 KB | eromba | |
| weight-view_field_access_control.patch | 510 bytes | eromba |
Comments
Comment #1
davisbenCommitted, thanks for the patch!