Currently, when building the configuration form, FormModeConfigForm::filterFormModeByEntityType() checks the permission of each role for each entity type / form mode combination. However, it does not check the 'Access all form modes' permission for the roles, and does not allow that permission to override the granular permissions.
I feel there's a use case to do so, to save site builders having to check every box for every form mode/entity type/role combination if they wish to grant all permissions to all roles - for example, a 'simple' form mode for all authenticated users for content creation (for basic/required fields), and 'default' form mode for content editing.
Attached patch allows the 'access all form modes' permission to override the granular ones. It also allows 'authenticated' permissions to override permissions for each non-anonymous role - i.e. roles inherit form mode permissions from authenticated.
| Comment | File | Size | Author |
|---|---|---|---|
| form_mode_control-allow_all_permission_override.patch | 2.66 KB | bgilhome |
Comments
Comment #3
mandclu commentedThanks for identifying this, and for providing a patch. I agree that this is a needed change, and in my testing it worked to grant access based on the blanket "Access all form modes".
Merged in, and will incorporate this into a new release shortly.