Improve Site Editor UI when user capabilities are restricted #56300
Labels
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Focus] Blocks Adoption
For issues that directly impact the ability to adopt features of Gutenberg.
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
In preparing another issue (#56299), I discovered some interesting behavior in the Site Editor when user capabilities are restricted. Consider this example user role:
This user role provides access to the Site Editor, but it's extremely restrictive. The user cannot add/modify pages, add/modify patterns, etc.
There are restrictions in place. For example, if I try to add a page, I get the following:
The Pages sidebar item still exists, but clicking on it does not load any pages. This is expected because the user role cannot access pages, but it's a bit confusing that the "Pages" menu item even exists. Then, when you try to add a page, there is an error message, as expected.
The same is true for templates. While this user role can modify templates, they cannot add them. When trying to do so, I just get a non-descript error message.
The same is true for patterns/template parts.
What is your proposed solution?
I think we need to hide UI elements when they do not function based on the user's given capabilities. We may even need new capabilities to handle this appropriately.
But at a minimum, the Pages sidebar items should probably be hidden if the user cannot access/create pages. Similarly, the + icons should be hidden if the user cannot add templates, template parts, or patterns.
I am sure there are other things I have missed, but ensuring use capabilities are accurately reflected in the Site Editor will improve the user experience for those who have been given access but have limited permissions. This is going to be important for Site Editor adoption, especially for agencies and those building sites for clients who want a more restricted editing environment for their users.
The text was updated successfully, but these errors were encountered: