-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patterns: Add lock icon when user doesn't have permission to edit a pattern #58157
Conversation
Size Change: +199 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
Not sure we should use the lock icon here as we (over)use this icon to indicate block locking elsewhere throughout the editor. Usually when a user doesn't have permission to perform an action we simply don't show that action. For example most of the post sidebar is empty when logged in as an author. With that convention in mind, here I'd expect that Edit original should simply not appear. Is that the current behaviour? Is it causing confusion among users? If so, then I'd suggest a more suitable alternative that doesn't use the lock icon is to grey out Edit original and show the You do not have permission copy when hovering on the button. |
Ok, let's just wait and see if there is any negative feedback about this change to the synced pattern before we sorry about this. Closing for now. |
What?
Add a lock icon in the toolbar if a user does not have permission to edit the current synced pattern
Why?
When the experiment that includes #57036 is made public users that do not have edit permission for a synced pattern will not be able to edit the content of the pattern at all, so it would be good to give some indication that this is intentional.
How?
Adds a lock icon to the toolbar with tooltip if the synced pattern has no overrides set and the user is not the owner or an admin.
Testing Instructions
Edit original
buttonauthor
user and insert the pattern and make sure you see a lock icon in the tool bar and the pattern is not editableEdit original
patternScreenshots or screencast
Author user and pattern they don't own:
Author user and pattern they created: