I have been using REST UI to code a custom resource API and so far it has been working great. I'm not sure what might have changed because now I'm getting a message saying

"message": "The 'restful post custom_rest_resource' permission is required."

I have checked and the permission is set for the user requesting the resource. It has worked before. If I grant permission for anonymous users it also works. But for some reason for authenticated AND admin users, it's not working.

Can anyone help me trace this? It's my first issue posted on Drupal.org, so if I'm missing anything, please let know and I'll try to provide it.

I'm using Drupal core 8.3.0-rc2, and RESTUI 8.x-1.x-dev. The permission table shows permission granted for my custom resource for Authenticated Users (I've set it before) and for Administrators. For Anonymous users, it's not intended to be accessible, so it should work as before. I noticed I'm also getting this for GET requests, not just POST. For Anonymous users, if I grant permission it works, but I think that the permissions aren't verified in that case, so no help there.

I've also tried rebuilding permissions using drush, but had no success.

Comments

joum created an issue. See original summary.

joum’s picture

Nevermind, apparently it was an OAuth issue. How can I close this?

Wim Leers’s picture

Status: Active » Fixed

Like this :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.