-
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
[Block Library - Site Logo]: Add permissions handling #32919
Conversation
Size Change: +563 B (0%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the PR and it works as advertised.
The code is clean and makes sense.
Looks good to merge 👍
I saw there's a failing test for e2e-native but it doesn't look related... I restarted the test, let's see if it passes the 2nd time.
EDIT: I see the same tests are failing in trunk
so not an issue with this branch 👍
I'd rather this expose the |
8473362
to
bf8fbc4
Compare
I updated the code. I could use another round of review/testing 😄 --edit: it seems I'll need to make some more changes regarding the |
b0cd792
to
82a61bb
Compare
8d75582
to
ed92e90
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
REST API Code looks good to me.
* [Block Library - Site Logo]: Add permissions handling * Add only logo id to rest index * add link to logo in rest index * use context 'view' only * fallback to logo id from rest index
* [Block Library - Site Logo]: Add permissions handling * Add only logo id to rest index * add link to logo in rest index * use context 'view' only * fallback to logo id from rest index
Description
Part of: #26573
Currently when a user with no right permissions to edit
Site Logo
has a broken experience due to the permissions check happening at the REST API.This PR fixes that by checking the rights and adding a readonly view for those users.
Testing instructions
Site Logo
and observe that everything works as before.Spinner
.Notes
remove
option in a follow up for this block? Is there any other way to remove it, like in Customizer or something? I couldn't find a way..Checklist:
*.native.js
files for terms that need renaming or removal).