Needs work
Project:
REST UI
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Jun 2019 at 21:47 UTC
Updated:
27 Nov 2020 at 12:50 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
oknateComment #3
oknateComment #4
oknateComment #5
oknateComment #6
wim leersThis UI is not provided by Drupal core, but by the contributed
restuimodule.Comment #7
clemens.tolboomWe do have
which I do overlook too sometimes.
We could list the permissions set like
Comment #8
clemens.tolboomI managed to get all permissions listed but this must be filtered out per rest resource. Not sure how to get there. Should we use \Drupal\rest\RestPermissions ?
Comment #9
clemens.tolboomThis is not useful:
Comment #10
clemens.tolboomFilter permissions based on current resource.
Resources are entity based and permissions are bundle based.
Comment #11
oknateI tested a little bit and #8 isn't what I was imagining.
I have permissions like - 'restful get recent_articles' from custom rest plugins
those were what I was thinking could be added.
Comment #12
clemens.tolboom@oknate I still have no clue how to list permissions related to a resource. Do you?
Patch #8 was just a mockup so setting back to active.
Comment #13
oknateComment #14
oknateHere's an initial patch. It's pretty much what I imagined.
Comment #15
oknateComment #16
oknateAdding test coverage.
Comment #17
oknatewrong interdiff, here's an update.
Comment #18
oknateMinor update, I saw I had one line duplicated in the test.
Comment #19
clemens.tolboomSo I misread it by putting it on the list page (doh).
@oknate your patch looks great and saves lots of navigation clicks :-) ... due to holidays I can test after 3 weeks :-/
Comment #20
oknateNo problem, enjoy your holidays!
Comment #21
clemens.tolboomThe permissions form does not show up.
This is always empty done in www/core/modules/rest/src/Plugin/rest/resource/EntityResource.php:366
Comment #22
oknateIt wasn't empty when I took the screenshot in #14. What resource are you testing with? When I get a chance, I'll try to find resources that don't have permissions, and see what happens with them. My guess is, if the permissions are empty, it's fine for it not to render the form. I'll have to check if there are more general permissions in those cases. It's been a while since I looked a this.
Comment #23
clemens.tolboomSo
Shows permissions
- http://drupal.d8/admin/config/services/rest/resource/dblog/edit which plugin is a
Drupal\\dblog\\Plugin\\rest\\resource\\DBLogResourceDoes not show permissions
- http://drupal.d8/admin/config/services/rest/resource/entity%3Anode/edit does not show permissions
- http://drupal.d8/admin/config/services/rest/resource/entity%3Auser/edit
- several others including (readonly) which are AFAIK config entities
are all
core/modules/rest/src/Plugin/rest/resource/EntityResource.php:358which all doHope that helps!
Comment #24
clemens.tolboom@oknate what shall we do with this issue?