Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem
The administrator user, which has all the permissions assigned, does not see the format selector anymore because it has the "Hide format selection for @entitys" permission, so the access check in better_formats_filter_process_format()
for the 'hide format selection ...' permission will pass and will set the access of the format element to FALSE.
Proposed solution
One possible solution (still not ideal in my opinion) is that we never hide the format field (and also the tips link) for admins. An user is admin if he has at least one of the admin roles (the ones which have all the permissions assigned)
Comment | File | Size | Author |
---|---|---|---|
#4 | format_options_hidden_2802393_4.patch | 1.7 KB | Devin Carlson |
| |||
#2 | format_options_hidden_2802393_1.patch | 1.92 KB | vasi1186 |
|
Comments
Comment #2
vasi1186 CreditAttribution: vasi1186 at Amazee Labs commentedAttached a patch that should solve the issue with the solution proposed.
Comment #3
Devin Carlson CreditAttribution: Devin Carlson commentedComment #4
Devin Carlson CreditAttribution: Devin Carlson commentedThanks for the patch! It looks great but I believe that we should follow filter.module's lead and simply consider the user an admin if they have the "administer filters" permission.
Comment #5
Devin Carlson CreditAttribution: Devin Carlson commentedTested #4 and committed to Better Formats 8.x-1.x.