- Issue created by @plopesc
- Merge request !10491Issue #3492584: Allow generic config entities to opt in to the entity specific... β (Open) created by plopesc
- πΊπΈUnited States smustgrave
Ran the test-only feature
1) Drupal\Tests\user\Unit\Plugin\Derivative\UserLocalTaskTest::testGetDerivativeDefinitions Failed asserting that two arrays are equal. --- Expected +++ Actual @@ @@ Array ( 'permissions_entity_bundle_of_id' => [...] - 'permissions_entity_no_bundle_of' => [...] ) /builds/issue/drupal-3492584/core/modules/user/tests/src/Unit/Plugin/Derivative/UserLocalTaskTest.php:95 FAILURES! Tests: 1, Assertions: 1, Fa
Which shows the coverage.
Issue summary appears complete.Thought maybe the variable rename would be out of scope but this does more clearly match the change.
Pipeline is still fully green
So to be the change should be fine and don't see anything glaring.Saving credit for @plopesc for doing everything lol
- πΊπΈUnited States benjifisher Boston area
@smustgrave:
The "T" in RTBC is for "testing", and that usually means manual testing (not just confirming that the automated tests pass). You did not mention how you tested this issue.
@plopesc:
Can you explain why you want this change?
In the issue summary, you wrote,
As an example of this feature, Text Formats opt-in to provide the Manage permissions tab-
I tested the MR with the Umami demo profile. As expected, I got a permissions form at
/en/admin/config/content/formats/manage/basic_html/permissions
:Do we really need a whole page just to manage one permission? Maybe we do, if people look for a local task (tab) to manage that permission. But we already have a page for managing all permissions from the
filter
module:/en/admin/people/permissions/module/filter
:I see that you added this issue after working on β¨ provide a Manage Permissions tab for Dashboard entity Active for the Dashboard module. I have not tried that module, so I am not sure of the use case there. Are there typically several dashboards on a site (perhaps most roles get a dedicated dashboard)? Are there several permissions for each one? If either answer is "no", then maybe
/en/admin/people/permissions/module/dashboard
is good enough.While working on #2934995: Add a "Manage permissions" tab for each bundle that has associated permissions β , we considered adding permissions forms for more generic config entities. In Comment #65 on that issue, I wrote,
I wonder if we want to make this work for entity types which don't define bundles, say config entities or content entities without bundles?
I am not sure what you mean. If there are no bundles, then there are no per-bundle permissions. For example, the user entity has no bundles.
There are permissions for each text format: see /admin/people/permissions/module/filter. There could be other examples, or a conrib [sic] module could add additional permissions for each text format. Even if we want to implement a permissions form for that use case, I think it is out of scope for this issue, since the implementation here relies heavily on the information we get from the Entity API.
This suggestion looks to me like a solution in search of a problem.
So we explicitly considered the
filter
module. I am not saying that the decision we made then was final, just that we need some justification for overriding that decision. - πͺπΈSpain plopesc Valladolid
Thank you for your input here @benjifisher.
While working on β¨ provide a Manage Permissions tab for Dashboard entity Active as you pointed out, we found out this limitation and tried to give support to generic config entities here.
Since Text formats were mentioned explicitly in the Change Record, I assumed it could be a good example for this new feature.
Reading the comment mentioned above, it seems you had good reasons to not give that support for Text Formats, so we could remove that part from this issue.
However, given that technically is possible, and some contrib modules, and maybe core ones in the future, could make use of this feature. Might you consider to implement it for now in a test entity type in core, leaving text formats as they are now?