Problem/Motivation
We sometimes override role permissions and it would be useful if a warning could be displayed on /admin/people/permissions.
Steps to reproduce
Create a class implementing ConfigFactoryOverrideInterface that adds some permissions:
public function loadOverrides($names): array {
$overrides = [];
if (in_array('user.role.webmestre', $names)) {
$overrides['user.role.webmestre']['permissions'][9999] = 'foo';
$overrides['user.role.webmestre']['permissions'][9998] = 'bar';
}
return $overrides;
}
Proposed resolution
FormOverrides::getFormConfigNames() should handle UserPermissionsForm.
Comments
Comment #3
prudloff commentedComment #4
prudloff commentedComment #5
prudloff commentedMerged the latest 8.x-1.x to get CI tests.
phpunit failures seem to be unrelated, I can reproduce them even if I revert my changes: #3511601: Failing phpunit tests
I also quickly checked if core now handles this: it does not.
Comment #6
arousseau commentedThe MR applies cleanly to 1.4 and the warning is displayed on /admin/people/permissions. Looks ready.
Comment #7
prudloff commented