-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
"rest_cannot_read" when user tries to look at / add API keys under their profile #157
Comments
Permissions are primarily focused on the I can see how it'd be beneficial for users without |
This worked pre-1.0.0. We ran into issues after updating. We've rolled back to 0.7.2 for now, until this is solved. |
I thought I remembered it working that way at one point. The old interface was a mish-mash of JS templates, Backbone, and PHP code with data passed all sorts of ways. In some ways it was easier to manage what was visible. Let me see if there's a way to do capability checks in JS. |
I guess I'd forgotten it worked that way when I reworked the UI and thought only users with I think adding a new capability for managing API keys would be a good idea, but that can be implemented in a future release. |
Our users have the "subscriber" role with the following capabilities added via the Members plugin:
If a user with that role logs in to WordPress and navigates to their profile to look at / add API keys, nothing happens and the following errors are logged in the browser console.
From what I gather from the code, this method will return an error if the user can't manage options and it will never reach the edit_user check:
https://github.com/cedaro/satispress/blob/develop/src/REST/ApiKeysController.php#L143-L160
The text was updated successfully, but these errors were encountered: