- Issue created by @jasonawant
- Merge request !69Issue #3340686: Introduce new 'Administer Patternkit' permission to grant access to configuration forms → (Merged) created by jasonawant
- 🇺🇸United States jasonawant New Orleans, USA
I've created a MR with changes to add this new permission. I've updated one the settings configuration form test within that MR.
I've attached a patch file representing this MR. I'm not sure if tests are running in the gitlab MR.
- Status changed to Needs review
over 1 year ago 4:26pm 15 March 2023 - 🇺🇸United States jasonawant New Orleans, USA
I reviewed all the tests that make use of the 'access administration pages'. I think this permission can be removed from all tests.
Here's another patch, not included in the MR, with additional changes and an interdiff to call out the changes. I just added this here for my convenience as these may not be directly related to this issue, but I wanted to raise awareness. Let me know what you'd like me to do with these additional changes if anything.
here are a few notes about my observations with these additional changes.
DefaultLayoutTest - fails with or without the 'access administration pages' permission with "Invalid permission administer node display." error. I think this is b/c it's missing a module that defines this permission, 'field_ui'. Also, I think this and other patternkit tests declare modules incorrectly as
static protected $modules
. This patch includes changes to DefaultLayoutTest.Running all the patternkit tests, these fail
* PatternkitTest::testLayoutBuilderBlockPlacementUi: Invalid permission administer node display. Probably b/c of missing field_ui module that provides the permission and thestatic protected $modules
usage as above.These failed for the same reason: "Failed asserting that two arrays are equal. This may be due to the environment I ran the tests
Drupal\Tests\patternkit\Kernel\Asset\LibraryTest::testGetLibraries
Drupal\Tests\patternkit\Kernel\Asset\LibraryTest::testBuildByExtension--- Expected +++ Actual @@ @@ 'plugin' => 'twig' 'type' => 'directory' 'data' => 'modules/contrib/patternkit/mo...it/src' - 'version' => '9.5.2' + 'version' => '9.1.0-beta6' )
- 🇺🇸United States jasonawant New Orleans, USA
The previous patch did not apply to latest beta release. Here's a skinny patch of just the permission, no tests.
- last update
12 months ago 430 pass - last update
12 months ago 430 pass - 🇺🇸United States slucero Arkansas
I've pushed some updates to the MR branch including all the updates from 9.1.x branch and some of the fixes mentioned in #5. The failing tests mentioned in that comment seem to be resolved from the incorporated updates.
If this round of tests pass, I believe the only other step we'll need to complete is writing up a brief change record about the new permission.
- last update
12 months ago 431 pass - last update
12 months ago 431 pass - 🇮🇳India minsharm India
Validated the confirmed and denied access to the patternkit setting page with or without new permission.
Scenario 1:
- Create a admin user role with new 'Administer Patternkit' permission.
- Navigate to /admin/config/user-interface/patternkit or /admin/config/user-interface/patternkit/json
- Confirm access.
Results : Able to access the patternkit config pages.
Scenario 2:
- Create a content editor user role which will NOT have this new 'Administer Patternkit' permission.
- Navigate to /admin/config/user-interface/patternkit or /admin/config/user-interface/patternkit/json
- Confirm access.
Results: Content authors is NOT able to access Patternkit config pages which is expected behaviour. As they may not need access to Patternkit configuration and site administrators or site builders may not want content authors to change patternkit configuration.
Note : Both the above scenarios has been validated on both D9 as well as on D10
-
slucero →
committed e9f475ad on 9.1.x authored by
jasonawant →
Issue #3340686 by jasonawant, slucero, minsharm: Add new Patternkit...
-
slucero →
committed e9f475ad on 9.1.x authored by
jasonawant →
- Status changed to Fixed
11 months ago 7:54pm 13 December 2023 Automatically closed - issue fixed for 2 weeks with no activity.