-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Sharing: prevent notice for non-admins #1653
Conversation
The connections page needs to have access to site settings for Eventbrite: wp-calypso/client/my-sites/sharing/connections/services/eventbrite.js Lines 17 to 27 in eb9131a
I think what we need to do is perform |
Ah good point, missed the EB part of this. Any idea how to make the request without showing the notice and without doing a huge refactor of how the |
Noting that with #1700 applied, I am getting this warning on the post editor as well (with an a user who's an author). That was without this PR applied. Going to check the combination of both shortly. |
With this and #1700 both applied, as an
|
Testing as an
|
Testing as a I think we just need to add an error message/block the page from loading services when |
Let's address this separately.
This is also true in master, so let's similarly address separately.
This is partially covered by #429, but I think we can do a bit more here with the filtering of eligible services since we're already making changes anyways. I'll look to update shortly.
This sounds like a bug. I'll take a look. |
Can you double-check this? I'm unable to reproduce, and have found sometimes in testing my extra accounts I accidentally test against WordPress.com instead of calypso.localhost . |
Now hiding Publicize services for contributors in 4ac7b95. |
4ac7b95
to
77cf51a
Compare
Rebased and squashed a few commits. I decided to go ahead and fix #1750 here since it was a very simple fix. See 77cf51a (and docs on |
Re-tested this PR with the latest code and all the different combinations of WP.com/Jetpack site + different permissions. It now works exactly as expected everywhere. Thanks for pushing through on this. Reviewed the code too, LGTM 🚢 I think it'd be good to update the REST API's |
Yeah, that sounds like a good idea. |
…dmins Sharing: prevent notice for non-admins
Currently non-admins (specifically authors and editors) receive the following notice when visiting
/sharing
:We only need site settings for buttons, not for connections. So this PR seeks to move the call to fetch the site settings to the buttons controller. This prevents the unnecessary notice for non-admins.
cc @aduth for review