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)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vasi1186 created an issue. See original summary.

vasi1186’s picture

Attached a patch that should solve the issue with the solution proposed.

Devin Carlson’s picture

Status: Active » Needs review
Devin Carlson’s picture

Thanks 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.

Devin Carlson’s picture

Status: Needs review » Fixed

Tested #4 and committed to Better Formats 8.x-1.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.