Closed (fixed)
Project:
Drupal core
Version:
8.4.x-dev
Component:
menu system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Jan 2017 at 06:18 UTC
Updated:
26 Jun 2017 at 13:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
Anonymous (not verified) commentedThis patch will fail. Way to pass:
Comment #5
Anonymous (not verified) commentedComment #6
wim leersLooks perfect, thanks!
Comment #7
alexpottThis needs more discussion. As per the other issues. See #2843772-15: EntityResource: Provide comprehensive test coverage for DateFormat entity
Comment #8
Anonymous (not verified) commentedComment #9
alexpott@vaplas - we still need to discuss what is the right generic approach to viewing config entities on #2870018: Should the 'access content' permission be used to control access to viewing configuration entities via REST
Comment #10
Anonymous (not verified) commented@alexpott, thank you for the additional clarification and the special issue. I just wanted to connect Mr. Bot to the discussion too :).
Postponed by #2870018: Should the 'access content' permission be used to control access to viewing configuration entities via REST.
Comment #11
wim leersYep, this is blocked on #2870018: Should the 'access content' permission be used to control access to viewing configuration entities via REST reaching consensus.
Comment #12
wim leersConsensus was achieved! Quoting #2870018-35: Should the 'access content' permission be used to control access to viewing configuration entities via REST:
Turns out #8 already changed it in the necessary way! :D
Comment #13
clemens.tolboomI do not see the mentioned #12
This issue is on 8.3.x. Is that correct?
Comment #14
wim leersChanging access control handlers means this can only be 8.4.x, good catch.
You don't see the "if has VIEW or ADMIN permission", because that'd require adding new permissions, which has yet other implications. That was the principle, but in applying the principle, we cannot add permissions in these issues; adding VIEW permissions must happen in other issues.
And per #2870018-47: Should the 'access content' permission be used to control access to viewing configuration entities via REST as well as #2843772-23: EntityResource: Provide comprehensive test coverage for DateFormat entity and subsequent comments, we must convert the
viewoperation to theview labeloperation in the access control handler, to not break BC. Full test coverage added.Comment #15
tedbowLooking at this access controller and #2843772: EntityResource: Provide comprehensive test coverage for DateFormat entity aren't a bunch of config entity access controllers going to be exactly the same?
Would it make sense to make
Then we could set all config entities that follow this pattern to use ConfigEntityAccessController directly?
If we can't do ConfigEntityAccessController could either have
ConfigEntityAccessHandlerTestBase extends KernelTestBaseor
ConfigEntityAccessHandlerTraitLooking at #2843772: EntityResource: Provide comprehensive test coverage for DateFormat entity all these tests are going to be very similar. Just a thought.
If we don't want to do any of that refactoring I think this good to RTBC!
Comment #16
wim leersThat's … a very good point :) Although I have to add that
isLocked()is not actually on a generic interface yet. I think extracting aLockableInterfaceis going to be a hard requirement. I count at least 5 config entity types that'd need to use it (DateFormat,NodeType,Menu,ConfigurableLanguage,FieldStorageConfig). Then this issue would have to be blocked on that one.On the other hand, I think many of these access control handlers will start to diverge over time. Their access control will get more refined. Particularly for complex and broadly/frequently used config entities like
Menu.So I personally think it's not worth it.
Comment #17
tedbowOk. sounds good. RTBC!
Comment #19
catchCommitted 5e2e4a8 and pushed to 8.4.x. Thanks!
Comment #20
wim leersThanks!