diff --git a/core/assets/scaffold/files/default.services.yml b/core/assets/scaffold/files/default.services.yml index c4b964fc2900e874b344439122f256b227b48a07..239ec7b3a560a03de2d7d8fb8cbf44ef5ca5b7da 100644 --- a/core/assets/scaffold/files/default.services.yml +++ b/core/assets/scaffold/files/default.services.yml @@ -1,4 +1,8 @@ parameters: + # Toggles the super user access policy. If your website has at least one user + # with the Administrator role, it is advised to set this to false. This allows + # you to make user 1 a regular user, strengthening the security of your site. + security.enable_super_user: true session.storage.options: # Default ini options for sessions. # diff --git a/core/core.services.yml b/core/core.services.yml index 9e10e74af4bd05d5c46f2c54209fe86eb443a1ee..d21e0074da86938979b7d5b49819ae06672fd12c 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -8,6 +8,7 @@ parameters: # function properly before that runs. cache_default_bin_backends: [] memory_cache_default_bin_backends: [] + security.enable_super_user: true session.storage.options: gc_probability: 1 gc_divisor: 100 diff --git a/core/lib/Drupal/Core/CoreServiceProvider.php b/core/lib/Drupal/Core/CoreServiceProvider.php index 1fb4cbadb645d66b0778c6942113d790a2147fe0..f8221fe69126ec42a15073e38288eee97474c363 100644 --- a/core/lib/Drupal/Core/CoreServiceProvider.php +++ b/core/lib/Drupal/Core/CoreServiceProvider.php @@ -18,6 +18,7 @@ use Drupal\Core\DependencyInjection\Compiler\RegisterStreamWrappersPass; use Drupal\Core\DependencyInjection\Compiler\StackedKernelPass; use Drupal\Core\DependencyInjection\Compiler\StackedSessionHandlerPass; +use Drupal\Core\DependencyInjection\Compiler\SuperUserAccessPolicyPass; use Drupal\Core\DependencyInjection\Compiler\TaggedHandlersPass; use Drupal\Core\DependencyInjection\Compiler\TwigExtensionPass; use Drupal\Core\DependencyInjection\ContainerBuilder; @@ -66,6 +67,8 @@ public function register(ContainerBuilder $container) { $container->addCompilerPass(new DevelopmentSettingsPass()); + $container->addCompilerPass(new SuperUserAccessPolicyPass()); + $container->addCompilerPass(new ProxyServicesPass()); $container->addCompilerPass(new BackendCompilerPass()); diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/SuperUserAccessPolicyPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/SuperUserAccessPolicyPass.php new file mode 100644 index 0000000000000000000000000000000000000000..cb3deb996158236145c24d487ac772557654f481 --- /dev/null +++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/SuperUserAccessPolicyPass.php @@ -0,0 +1,23 @@ +<?php + +namespace Drupal\Core\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Removes the super user access policy when toggled off. + */ +class SuperUserAccessPolicyPass implements CompilerPassInterface { + + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container): void { + if ($container->getParameter('security.enable_super_user') === FALSE) { + $container->removeDefinition('access_policy.super_user'); + $container->removeAlias('Drupal\Core\Session\SuperUserAccessPolicy'); + } + } + +} diff --git a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php index b7c6d8861231a3d83291ca6ab63e44189c9d739c..14ec4d3e35e39c9260fc00afd6a850b1ecd1e6a2 100644 --- a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php +++ b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php @@ -60,6 +60,15 @@ trait FunctionalTestSetupTrait { */ protected $apcuEnsureUniquePrefix = FALSE; + /** + * Set to TRUE to make user 1 a super user. + * + * @see \Drupal\Core\Session\SuperUserAccessPolicy + * + * @var bool + */ + protected bool $usesSuperUserAccessPolicy; + /** * Prepares site settings and services before installation. */ @@ -138,6 +147,15 @@ protected function prepareSettings() { // from running during tests. $services = $yaml->parse($content); $services['parameters']['session.storage.options']['gc_probability'] = 0; + // Disable the super user access policy so that we are sure our tests check + // for the right permissions. + if (!isset($this->usesSuperUserAccessPolicy)) { + $test_file_name = (new \ReflectionClass($this))->getFileName(); + // @todo Decide in https://www.drupal.org/project/drupal/issues/3437926 + // how to remove this fallback behavior. + $this->usesSuperUserAccessPolicy = !str_starts_with($test_file_name, $this->root . DIRECTORY_SEPARATOR . 'core'); + } + $services['parameters']['security.enable_super_user'] = $this->usesSuperUserAccessPolicy; if ($this->strictConfigSchema) { // Add a listener to validate configuration schema on save. $test_file_name = (new \ReflectionClass($this))->getFileName(); diff --git a/core/modules/block/tests/src/Functional/BlockHtmlTest.php b/core/modules/block/tests/src/Functional/BlockHtmlTest.php index 6dc6853500c07e551b444d213bc501e3357fd41b..89cd2a46ce6b494dd9094857ef2bb6e2f3813db2 100644 --- a/core/modules/block/tests/src/Functional/BlockHtmlTest.php +++ b/core/modules/block/tests/src/Functional/BlockHtmlTest.php @@ -20,6 +20,14 @@ class BlockHtmlTest extends BrowserTestBase { */ protected static $modules = ['block', 'block_test']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/block/tests/src/Functional/BlockXssTest.php b/core/modules/block/tests/src/Functional/BlockXssTest.php index dc95fea4d08f5aa95f1ab611c7bb2824dc1c94ae..f68350a6b0b9cc3aa3ba0cc2037577b6eefba003 100644 --- a/core/modules/block/tests/src/Functional/BlockXssTest.php +++ b/core/modules/block/tests/src/Functional/BlockXssTest.php @@ -25,6 +25,14 @@ class BlockXssTest extends BrowserTestBase { */ protected static $modules = ['block', 'block_content', 'menu_ui', 'views']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/block/tests/src/FunctionalJavascript/BlockContextualLinksTest.php b/core/modules/block/tests/src/FunctionalJavascript/BlockContextualLinksTest.php index 8e8e7651d945b74e0c2d579d817d218acb48b53d..a494ae5e6da4c88458f301d15f221b53d06c9557 100644 --- a/core/modules/block/tests/src/FunctionalJavascript/BlockContextualLinksTest.php +++ b/core/modules/block/tests/src/FunctionalJavascript/BlockContextualLinksTest.php @@ -18,6 +18,14 @@ class BlockContextualLinksTest extends WebDriverTestBase { */ protected static $modules = ['user', 'block', 'contextual']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/comment/tests/src/Functional/CommentStatisticsTest.php b/core/modules/comment/tests/src/Functional/CommentStatisticsTest.php index e124337219369a6244efa64bdae1142da7cbe8cd..64ccf1d2b31ca620a9ec4f82a4dcd5e3abe5b54d 100644 --- a/core/modules/comment/tests/src/Functional/CommentStatisticsTest.php +++ b/core/modules/comment/tests/src/Functional/CommentStatisticsTest.php @@ -15,6 +15,14 @@ */ class CommentStatisticsTest extends CommentTestBase { + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * A secondary user for posting comments. * diff --git a/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php b/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php index a06d6256596b78cf6b6363d3b50fda849a644109..7e9ddd942818f55179c82852d8a8847ab985be78 100644 --- a/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php +++ b/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php @@ -70,6 +70,14 @@ class ConfigExportImportUITest extends BrowserTestBase { */ protected static $modules = ['config', 'node', 'field']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/config/tests/src/Functional/LanguageNegotiationFormOverrideTest.php b/core/modules/config/tests/src/Functional/LanguageNegotiationFormOverrideTest.php index 305a6ba742466804c9b3814dddf657d8983299e2..a1cabcd894d3950c71a7f5cb979adca433913def 100644 --- a/core/modules/config/tests/src/Functional/LanguageNegotiationFormOverrideTest.php +++ b/core/modules/config/tests/src/Functional/LanguageNegotiationFormOverrideTest.php @@ -16,6 +16,14 @@ class LanguageNegotiationFormOverrideTest extends BrowserTestBase { protected static $modules = ['language', 'locale', 'locale_test']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php index 6f312c1dd689f78760feb5e6973e0c6dbf35838e..fe0fd22454f44fc892ea72b2c5d72c6a9df09b00 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php @@ -36,6 +36,14 @@ class ModerationContentTranslationTest extends BrowserTestBase { 'content_translation', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php index 71dffde8e88b3286d321528c8d91fd1be5999cd2..d84d3f97c446f091f83d70f54658c1491a32aadf 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php @@ -30,6 +30,14 @@ class ModerationFormTest extends ModerationStateTestBase { 'content_translation', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php index e145c082fab20f268b6224a1bd702eff50db4b7f..d4bce6246029896560b410e0ad35e74dc3c37d79 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php @@ -29,6 +29,14 @@ class ModerationLocaleTest extends ModerationStateTestBase { 'content_translation', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationStateBlockTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationStateBlockTest.php index f4d3bef5d2f57341e95888ec45a892c6169b76d9..34b03ed22ff56953bff779cf6b6ca872ab400398 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModerationStateBlockTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationStateBlockTest.php @@ -14,6 +14,14 @@ */ class ModerationStateBlockTest extends ModerationStateTestBase { + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php b/core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php index 6e3be8786baccdc751a540dc5ef436c04fb7a027..bb47a4e89e11dd6f23248b70b3a0b38178a04f61 100644 --- a/core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php +++ b/core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php @@ -22,6 +22,14 @@ class WorkspaceContentModerationIntegrationTest extends ModerationStateTestBase */ protected static $modules = ['node', 'workspaces']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php index 80ebf288c2179534b3294e2f3a014b48d6c10a94..b1722d4ae448deaa6992843ee1df9644b557029b 100644 --- a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php @@ -31,6 +31,14 @@ class EntityStateChangeValidationTest extends KernelTestBase { 'workflows', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * An admin user. * diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php index e462a2a81b6823ad7b31a53fc6cd83a11bac1f4c..67778bf1674138bacf4d6739506ec7c8171b5120 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php @@ -20,6 +20,14 @@ class ContentTranslationEnableTest extends BrowserTestBase { */ protected static $modules = ['entity_test', 'menu_link_content', 'node']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationNewTranslationWithExistingRevisionsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationNewTranslationWithExistingRevisionsTest.php index 7460f1fd8e165330087c237802b7a51332b48b72..ccad2c9bad2d577bbfe568423b68e38d0e4c8923 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationNewTranslationWithExistingRevisionsTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationNewTranslationWithExistingRevisionsTest.php @@ -25,6 +25,14 @@ class ContentTranslationNewTranslationWithExistingRevisionsTest extends ContentT 'node', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationOutdatedRevisionTranslationTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationOutdatedRevisionTranslationTest.php index 19bf67cdfb9d9e677cf4f7cc86f26cc79d709ff4..2361421e3f32f806c3e59e5538b65db528a5aa17 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationOutdatedRevisionTranslationTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationOutdatedRevisionTranslationTest.php @@ -14,6 +14,14 @@ */ class ContentTranslationOutdatedRevisionTranslationTest extends ContentTranslationPendingRevisionTestBase { + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationRevisionTranslationDeletionTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationRevisionTranslationDeletionTest.php index c5ede536ef19b818408ad29f59f9fd2cc5b91a5c..2f81f4c766e06b08deafb689edd731c583fa4f3a 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationRevisionTranslationDeletionTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationRevisionTranslationDeletionTest.php @@ -14,6 +14,14 @@ */ class ContentTranslationRevisionTranslationDeletionTest extends ContentTranslationPendingRevisionTestBase { + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php index 68773886870feab7dbc32c49f0479716720fc38b..2a12a8ad2a0186ee57580f22332e27bdf084c0fc 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php @@ -24,6 +24,14 @@ class ContentTranslationUntranslatableFieldsTest extends ContentTranslationPendi */ protected static $modules = ['field_test']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceXSSTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceXSSTest.php index ab811e59c320bdea13c3656cf382cc419e33a2c0..6017fb4059fe9e718d77573e755b10a928feb878 100644 --- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceXSSTest.php +++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceXSSTest.php @@ -25,6 +25,14 @@ class EntityReferenceXSSTest extends BrowserTestBase { */ protected static $modules = ['node']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php b/core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php index 489d4132705cac514c43427a48b35b6bb8195b55..41537e37c8d80fc7398dd284b10202e5389f03b3 100644 --- a/core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php +++ b/core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php @@ -22,6 +22,14 @@ class FieldDefaultValueCallbackTest extends BrowserTestBase { */ protected static $modules = ['node', 'field_test', 'field_ui']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/field_ui/tests/src/Functional/FieldUIRouteTest.php b/core/modules/field_ui/tests/src/Functional/FieldUIRouteTest.php index e75e5714cc9103f13fc365c6e388aaf7c068364f..963143ea2b89d2fcb8a819d56ee54ba37680d9bb 100644 --- a/core/modules/field_ui/tests/src/Functional/FieldUIRouteTest.php +++ b/core/modules/field_ui/tests/src/Functional/FieldUIRouteTest.php @@ -22,6 +22,14 @@ class FieldUIRouteTest extends BrowserTestBase { */ protected static $modules = ['block', 'entity_test', 'field_ui']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/file/tests/src/Kernel/SaveTest.php b/core/modules/file/tests/src/Kernel/SaveTest.php index 55a84cee63e26e647de404323ab0105c831bad01..d06d98f1230c7d433f1f45d483ebb25f0f369295 100644 --- a/core/modules/file/tests/src/Kernel/SaveTest.php +++ b/core/modules/file/tests/src/Kernel/SaveTest.php @@ -11,6 +11,14 @@ */ class SaveTest extends FileManagedUnitTestBase { + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + public function testFileSave() { // Create a new file entity. $file = File::create([ diff --git a/core/modules/forum/tests/src/Functional/ForumUninstallTest.php b/core/modules/forum/tests/src/Functional/ForumUninstallTest.php index 6abc9c909e1eaebc25003cef501b444f4ddb8c14..23b708e04a1e20a16f7623ac2d758139c5c5c144 100644 --- a/core/modules/forum/tests/src/Functional/ForumUninstallTest.php +++ b/core/modules/forum/tests/src/Functional/ForumUninstallTest.php @@ -28,6 +28,14 @@ class ForumUninstallTest extends BrowserTestBase { */ protected static $modules = ['forum']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/help/tests/src/Functional/HelpTest.php b/core/modules/help/tests/src/Functional/HelpTest.php index afcf2d04b4c64c7b3cf04b93d182241c29c2ee2b..73b0855cc31689bf8a2c971d77892f69fa96c13e 100644 --- a/core/modules/help/tests/src/Functional/HelpTest.php +++ b/core/modules/help/tests/src/Functional/HelpTest.php @@ -33,6 +33,14 @@ class HelpTest extends BrowserTestBase { 'history', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/help/tests/src/Functional/HelpTopicSearchTest.php b/core/modules/help/tests/src/Functional/HelpTopicSearchTest.php index aff7001807acf6c75766f171bfdbbe18dd23ccb1..0403dc30b142a045f7e87ca23b8de4211c757d0c 100644 --- a/core/modules/help/tests/src/Functional/HelpTopicSearchTest.php +++ b/core/modules/help/tests/src/Functional/HelpTopicSearchTest.php @@ -29,6 +29,14 @@ class HelpTopicSearchTest extends HelpTopicTranslatedTestBase { 'language', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/help/tests/src/Functional/HelpTopicsSyntaxTest.php b/core/modules/help/tests/src/Functional/HelpTopicsSyntaxTest.php index c7d7dec0efc0b4bec9d2ef4b43ee959de3be259a..adbb2987d7c3c066a3616b6c7495d57ba6029f9b 100644 --- a/core/modules/help/tests/src/Functional/HelpTopicsSyntaxTest.php +++ b/core/modules/help/tests/src/Functional/HelpTopicsSyntaxTest.php @@ -29,6 +29,14 @@ class HelpTopicsSyntaxTest extends BrowserTestBase { 'locale', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/language/tests/src/Functional/LanguageConfigOverrideImportTest.php b/core/modules/language/tests/src/Functional/LanguageConfigOverrideImportTest.php index 78debfa7320f85585e8eff5a1fad54a29107bbdb..0601ba3f3af21f06de745e7429d2c7aab9e5ef55 100644 --- a/core/modules/language/tests/src/Functional/LanguageConfigOverrideImportTest.php +++ b/core/modules/language/tests/src/Functional/LanguageConfigOverrideImportTest.php @@ -27,6 +27,14 @@ class LanguageConfigOverrideImportTest extends BrowserTestBase { 'config_translation', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderOverridesTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderOverridesTest.php index acbedfced01ae77588c7b6bff317714ab7a2009d..1b663a3cb454e46971de898eaf618d0cdf14f94d 100644 --- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderOverridesTest.php +++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderOverridesTest.php @@ -15,6 +15,14 @@ */ class LayoutBuilderOverridesTest extends LayoutBuilderTestBase { + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * Tests deleting a field in-use by an overridden layout. */ diff --git a/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php b/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php index 80a8d383107a2d4eada59bba1f5d41c684a769cc..924a37380a5cece1529a57fcf3914e348a6efb27 100644 --- a/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php @@ -25,6 +25,14 @@ class LocaleLocaleLookupTest extends BrowserTestBase { */ protected static $modules = ['locale', 'locale_test']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/media/tests/src/Functional/MediaRequirementsTest.php b/core/modules/media/tests/src/Functional/MediaRequirementsTest.php index 94838fff7da589f53d5fb19365f3d5d5e7869a4e..26cf3c8b6f69fcc53dbe55978e3fbecf92af9023 100644 --- a/core/modules/media/tests/src/Functional/MediaRequirementsTest.php +++ b/core/modules/media/tests/src/Functional/MediaRequirementsTest.php @@ -11,6 +11,14 @@ */ class MediaRequirementsTest extends MediaFunctionalTestBase { + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php index e7bbe116f3da699107d65113dce1c8c8e1f5fb36..a892fb05ea2e6e1cc74302eb483918aa487d1511 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php @@ -39,6 +39,14 @@ class ContentModerationTest extends WebDriverTestBase { 'views', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/menu_ui/tests/src/Functional/MenuUiNodeTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUiNodeTest.php index f7b03b3422e177bf8e0c740da9f736e8d35e59bd..8e4e2a62787b8c3d695b450a7b48c952c2a9c301 100644 --- a/core/modules/menu_ui/tests/src/Functional/MenuUiNodeTest.php +++ b/core/modules/menu_ui/tests/src/Functional/MenuUiNodeTest.php @@ -43,6 +43,14 @@ class MenuUiNodeTest extends BrowserTestBase { 'content_translation', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateControllerTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateControllerTest.php index 2ca1bfef0b2a2a0874a7945883dce85bf5e71a18..952768053b7e67b7c75737ddca75ad9bfca1d4c9 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateControllerTest.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateControllerTest.php @@ -23,6 +23,14 @@ class MigrateControllerTest extends BrowserTestBase { 'views_ui', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php b/core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php index c9b16994a4d8aa4c32c17b1af6b437af549563c6..3f74d9c63d78203344c99a761513c59cf831c057 100644 --- a/core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php +++ b/core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php @@ -28,6 +28,14 @@ class NodeAccessCacheabilityTest extends NodeTestBase { 'node_access_test_auto_bubbling', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php b/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php index 8e3303f1d419d0c7bf67c442c9553d05847b724b..e89972e5cbac1b30d96a123238f666b0707e66ea 100644 --- a/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php +++ b/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php @@ -22,6 +22,14 @@ class NodeAccessGrantsCacheContextTest extends NodeTestBase { */ protected static $modules = ['node_access_test']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareCombinationTest.php b/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareCombinationTest.php index a3202cfc5b85cda85740cb61b2ebfc7e84be9191..6e573db85ce265b17f626a70fd624041772aec2b 100644 --- a/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareCombinationTest.php +++ b/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareCombinationTest.php @@ -28,6 +28,14 @@ class NodeAccessLanguageAwareCombinationTest extends NodeAccessTestBase { 'node_access_test', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * A set of nodes to use in testing. * diff --git a/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareTest.php b/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareTest.php index c4afd4d319a629a98732694a15e7870500f1d9c0..58239b4f9009e07a6362a3be56da626c26bf4601 100644 --- a/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareTest.php +++ b/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareTest.php @@ -23,6 +23,14 @@ class NodeAccessLanguageAwareTest extends NodeAccessTestBase { */ protected static $modules = ['language', 'node_access_test_language']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * A set of nodes to use in testing. * diff --git a/core/modules/node/tests/src/Kernel/NodeAccessLanguageTest.php b/core/modules/node/tests/src/Kernel/NodeAccessLanguageTest.php index 29a2e96a58e805d99a10fc6d789d0b4f53e1a39b..d148e4103343f28c90e6f57a33b99dc0622ee8eb 100644 --- a/core/modules/node/tests/src/Kernel/NodeAccessLanguageTest.php +++ b/core/modules/node/tests/src/Kernel/NodeAccessLanguageTest.php @@ -20,6 +20,14 @@ class NodeAccessLanguageTest extends NodeAccessTestBase { */ protected static $modules = ['language', 'node_access_test']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/node/tests/src/Kernel/Views/NodeViewsFieldAccessTest.php b/core/modules/node/tests/src/Kernel/Views/NodeViewsFieldAccessTest.php index 8c09c23a4b4996711503ca09592aab21c44f82e0..4d9e8435febcbd515ccf5e9d898dae5fe68966fb 100644 --- a/core/modules/node/tests/src/Kernel/Views/NodeViewsFieldAccessTest.php +++ b/core/modules/node/tests/src/Kernel/Views/NodeViewsFieldAccessTest.php @@ -20,6 +20,14 @@ class NodeViewsFieldAccessTest extends FieldFieldAccessTestBase { */ protected static $modules = ['node', 'entity_test']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/path/tests/src/Functional/PathContentModerationTest.php b/core/modules/path/tests/src/Functional/PathContentModerationTest.php index 68f973b512f2fc26df7cd25e564a480c3b699a45..a50e0c64ed995d086f7745860dc5dbc94b828c2e 100644 --- a/core/modules/path/tests/src/Functional/PathContentModerationTest.php +++ b/core/modules/path/tests/src/Functional/PathContentModerationTest.php @@ -31,6 +31,14 @@ class PathContentModerationTest extends BrowserTestBase { 'content_translation', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php b/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php index c56a22baa260706943771eab8b22aed09579b7d3..e2e957b0ef1d826f8c0914179253f6abf40a5b6a 100644 --- a/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php +++ b/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php @@ -31,6 +31,14 @@ class ShortcutCacheTagsTest extends EntityCacheTagsTestBase { 'block', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php b/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php index 0687111d2d7b6d1229c93dc611ce09c5ea3f6eb9..4880f19073266149538686366d18f02134d3b06e 100644 --- a/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php +++ b/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php @@ -31,6 +31,14 @@ class ShortcutLinksTest extends ShortcutTestBase { */ protected static $modules = ['router_test', 'views', 'block']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/system/tests/src/Functional/Bootstrap/DrupalMessengerServiceTest.php b/core/modules/system/tests/src/Functional/Bootstrap/DrupalMessengerServiceTest.php index d83d719ffed4db7a1f65fd1b45f2c41065a7476d..f6ef52cdce890f2ff055d2d08ffa711660c0201a 100644 --- a/core/modules/system/tests/src/Functional/Bootstrap/DrupalMessengerServiceTest.php +++ b/core/modules/system/tests/src/Functional/Bootstrap/DrupalMessengerServiceTest.php @@ -22,6 +22,14 @@ class DrupalMessengerServiceTest extends BrowserTestBase { */ protected static $modules = ['system_test']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php b/core/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php index b4d4639ef3f1c7b42ebc038abeaeda28208b2b16..bf7384543ada928914fdfb7bd9c3c74b6337cdf0 100644 --- a/core/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php +++ b/core/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php @@ -23,6 +23,14 @@ class EntityReferenceFieldCreationTest extends BrowserTestBase { */ protected static $modules = ['entity_test', 'node', 'field_ui']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/system/tests/src/Functional/File/FileSaveHtaccessLoggingTest.php b/core/modules/system/tests/src/Functional/File/FileSaveHtaccessLoggingTest.php index 726ba84b947ecf6439cb7030549ba478ec030385..1067d8d0b07f3a4c0c9bf1938f082834565237cf 100644 --- a/core/modules/system/tests/src/Functional/File/FileSaveHtaccessLoggingTest.php +++ b/core/modules/system/tests/src/Functional/File/FileSaveHtaccessLoggingTest.php @@ -14,8 +14,19 @@ */ class FileSaveHtaccessLoggingTest extends BrowserTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['dblog']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php b/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php index 1612817f78a3f4d30699b35755bead6a4ec6e244..e82ac3b50f75e1025b5f32250099533d818c7bbb 100644 --- a/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php +++ b/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php @@ -24,6 +24,14 @@ class LocalTasksTest extends BrowserTestBase { */ protected static $modules = ['block', 'menu_test', 'entity_test', 'node']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/system/tests/src/Functional/Module/ClassLoaderTest.php b/core/modules/system/tests/src/Functional/Module/ClassLoaderTest.php index cb861c9b71b0ed2fdb997b7b571dbd0d6bbad60e..f8bc064505716b80a90fb76b490c09a8a66971bf 100644 --- a/core/modules/system/tests/src/Functional/Module/ClassLoaderTest.php +++ b/core/modules/system/tests/src/Functional/Module/ClassLoaderTest.php @@ -14,6 +14,14 @@ */ class ClassLoaderTest extends BrowserTestBase { + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * The expected result from calling the module-provided class' method. * diff --git a/core/modules/system/tests/src/Functional/Module/GenericModuleTestBase.php b/core/modules/system/tests/src/Functional/Module/GenericModuleTestBase.php index 0b48f7aa83cb5fb84a90580df1e4801605108099..f17f81fa0d895b288ce2d6f568870f9ab43d530a 100644 --- a/core/modules/system/tests/src/Functional/Module/GenericModuleTestBase.php +++ b/core/modules/system/tests/src/Functional/Module/GenericModuleTestBase.php @@ -19,6 +19,14 @@ abstract class GenericModuleTestBase extends BrowserTestBase { 'help', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/system/tests/src/Functional/System/DateFormatsLockedTest.php b/core/modules/system/tests/src/Functional/System/DateFormatsLockedTest.php index 89da3f0b4f6f6bca9eb9a222c3128cfce6f39f3c..52da4d4fedefa89198a1302c48be7fa6fe75e9ee 100644 --- a/core/modules/system/tests/src/Functional/System/DateFormatsLockedTest.php +++ b/core/modules/system/tests/src/Functional/System/DateFormatsLockedTest.php @@ -13,6 +13,14 @@ */ class DateFormatsLockedTest extends BrowserTestBase { + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php b/core/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php index 731fac2d4ebdceefd29d9c412e974b3127a7ddb5..706b7501ac9d2d79167337060e788cf01e1861a6 100644 --- a/core/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php +++ b/core/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php @@ -16,6 +16,14 @@ class MaintenanceThemeUpdateRegistryTest extends BrowserTestBase { use RequirementsPageTrait; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php index e5e2da9a3cd1c556a06e8cf96aef776d1da6f224..c8f2faa703f07770cf023ec3c2c154cc0e626c09 100644 --- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php +++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php @@ -36,6 +36,14 @@ class UpdateScriptTest extends BrowserTestBase { 'test_another_module_required_by_theme', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php b/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php index e4cb0506e3f7c8bc0c46abbc2b9820e507ba974e..86a77dfd9493c19f1ee1e4807b94c01a439c692e 100644 --- a/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php +++ b/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php @@ -30,6 +30,14 @@ class DateFormatAccessControlHandlerTest extends KernelTestBase { 'user', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * The date_format access control handler. * diff --git a/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php b/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php index c3c9b6942c12c4e75b6cdba5b4a6c4bbd7fa2198..e737b60b395a7230ec356e68d2737493f18c106e 100644 --- a/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php +++ b/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php @@ -48,6 +48,14 @@ class EntityReferenceSelectionAccessTest extends KernelTestBase { 'user', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php b/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php index d8b3c4f868c646062728d937d8b2f9f9ad284e89..c4de55a8e08cce0de3dfb3d0c000145056a1cf4c 100644 --- a/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php +++ b/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php @@ -29,6 +29,14 @@ class MenuAccessControlHandlerTest extends KernelTestBase { 'user', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * The menu access control handler. * diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldVidTest.php b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldVidTest.php index 4bad95a92227b9dc43ebf47ef4d292546ee90d12..6851d5823d8042d60adda89e5589d04a2ebcd4bb 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldVidTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldVidTest.php @@ -33,6 +33,14 @@ class TaxonomyFieldVidTest extends ViewsKernelTestBase { 'filter', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * Views used by this test. * diff --git a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarActiveTrailTest.php b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarActiveTrailTest.php index d54c2d6a1250f93950bed6226c73a17c0604ccb1..e14a32ba0d53291bf624aaf730a9fac9c66d11cf 100644 --- a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarActiveTrailTest.php +++ b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarActiveTrailTest.php @@ -18,6 +18,14 @@ class ToolbarActiveTrailTest extends WebDriverTestBase { */ protected static $modules = ['toolbar', 'node', 'field_ui']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/user/tests/src/Functional/UserRequirementsTest.php b/core/modules/user/tests/src/Functional/UserRequirementsTest.php index 5e5abbe3af8011b50d83e23023365e8dd7df4bff..ac126771ca7a0844c6323954b2104b3786fb4203 100644 --- a/core/modules/user/tests/src/Functional/UserRequirementsTest.php +++ b/core/modules/user/tests/src/Functional/UserRequirementsTest.php @@ -13,6 +13,14 @@ */ class UserRequirementsTest extends BrowserTestBase { + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/user/tests/src/Kernel/WhoIsOnlineBlockTest.php b/core/modules/user/tests/src/Kernel/WhoIsOnlineBlockTest.php index 4582e3455d0be3d3a009d36aedf133598fcafd14..0b329c96fb61bb9eea72d061c61262abc51ae311 100644 --- a/core/modules/user/tests/src/Kernel/WhoIsOnlineBlockTest.php +++ b/core/modules/user/tests/src/Kernel/WhoIsOnlineBlockTest.php @@ -18,6 +18,14 @@ class WhoIsOnlineBlockTest extends KernelTestBase { */ protected static $modules = ['system', 'user', 'block', 'views']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * The block being tested. * diff --git a/core/modules/views/tests/src/Functional/Handler/FieldEntityLinkBaseTest.php b/core/modules/views/tests/src/Functional/Handler/FieldEntityLinkBaseTest.php index 9de00d72ab1fc57d5f3f1017e48a34936e282bb8..3d36935b01c61747cab42846a9268182840c0abc 100644 --- a/core/modules/views/tests/src/Functional/Handler/FieldEntityLinkBaseTest.php +++ b/core/modules/views/tests/src/Functional/Handler/FieldEntityLinkBaseTest.php @@ -27,6 +27,14 @@ class FieldEntityLinkBaseTest extends ViewTestBase { */ protected static $modules = ['node', 'language']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersStringTest.php b/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersStringTest.php index 301dbb05ccc5c072bdcc280c7a02936af15bd543..04c87553f8afd6e0b6aaf60577484e26fc1d5eaa 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersStringTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersStringTest.php @@ -23,6 +23,14 @@ class ContextualFiltersStringTest extends ViewTestBase { 'views_test_config', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php index 755461b99d5ee32319743cc1d743bbb5dd3854b9..6fb393a75e288f1f198529e643156432d9f8bc9b 100644 --- a/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php @@ -31,6 +31,14 @@ class DisplayPageWebTest extends ViewTestBase { */ protected static $modules = ['block', 'views_ui']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/views/tests/src/Functional/UserBatchActionTest.php b/core/modules/views/tests/src/Functional/UserBatchActionTest.php index 22313fcb3fac44a806287a17b76971ec359a7e31..9db7ac55b0bf61476a6a090925cfbfa2bf084033 100644 --- a/core/modules/views/tests/src/Functional/UserBatchActionTest.php +++ b/core/modules/views/tests/src/Functional/UserBatchActionTest.php @@ -25,6 +25,14 @@ class UserBatchActionTest extends BrowserTestBase { 'views', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php index 2d33f07cd1c70db4d4c00baabae1a4d0421878ba..0ec083a72a9aeb7058cb9ecc47e8dfb7524606b6 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php @@ -33,6 +33,14 @@ class FieldFieldTest extends ViewsKernelTestBase { 'views_entity_test', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/views/tests/src/Kernel/Plugin/RssFieldsTest.php b/core/modules/views/tests/src/Kernel/Plugin/RssFieldsTest.php index d43a531b593d79d91f0b8643cffaf0d72d0daf4e..83dec53848f1c2b7a8c7a93504d1f86e338192b3 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/RssFieldsTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/RssFieldsTest.php @@ -23,6 +23,14 @@ class RssFieldsTest extends ViewsKernelTestBase { */ protected static $modules = ['node', 'field', 'text', 'filter']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php b/core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php index 97ab6dfc54900a3e8ac3720ed8bc334913dd069c..c8f09c54c71fa29b3b7f736498f9636ecbea973a 100644 --- a/core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php +++ b/core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php @@ -32,6 +32,14 @@ class PathWorkspacesTest extends BrowserTestBase { 'workspaces', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php index c333f7b56507ea2c340c15810458d7b55c319db5..f8767de56adc50cd9104ab540b0b8b74d88e4022 100644 --- a/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php +++ b/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php @@ -35,6 +35,14 @@ class WorkspaceTest extends BrowserTestBase { 'workspaces', ]; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/modules/workspaces/tests/src/Functional/WorkspacesUninstallTest.php b/core/modules/workspaces/tests/src/Functional/WorkspacesUninstallTest.php index 65a986e91fce1b95776606c0f042f8eb0cf531f8..36e0039ebde3680ec99c4664b984e4d57fd1c89a 100644 --- a/core/modules/workspaces/tests/src/Functional/WorkspacesUninstallTest.php +++ b/core/modules/workspaces/tests/src/Functional/WorkspacesUninstallTest.php @@ -20,6 +20,14 @@ class WorkspacesUninstallTest extends BrowserTestBase { */ protected static $modules = ['workspaces', 'node']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/profiles/minimal/tests/src/Functional/MinimalTest.php b/core/profiles/minimal/tests/src/Functional/MinimalTest.php index 5bf99e3343bc445f25cff9023efc9b3a56c093eb..2f3a9f1f066d8fd371dfc77eb040550c34a18880 100644 --- a/core/profiles/minimal/tests/src/Functional/MinimalTest.php +++ b/core/profiles/minimal/tests/src/Functional/MinimalTest.php @@ -21,6 +21,14 @@ class MinimalTest extends BrowserTestBase { protected $profile = 'minimal'; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/profiles/standard/tests/src/Functional/StandardTest.php b/core/profiles/standard/tests/src/Functional/StandardTest.php index da90fac2bb62e08f581aa43704328b58fa2a1c1c..cbe8f38fc608f1f117c46718e8bcb82a93025fbd 100644 --- a/core/profiles/standard/tests/src/Functional/StandardTest.php +++ b/core/profiles/standard/tests/src/Functional/StandardTest.php @@ -18,6 +18,7 @@ use Drupal\Tests\BrowserTestBase; use Drupal\Tests\RequirementsPageTrait; use Drupal\user\Entity\Role; +use Drupal\user\Entity\User; use Symfony\Component\Validator\ConstraintViolation; /** @@ -295,6 +296,20 @@ function (ConstraintViolation $v) { } } + + // Tests that user 1 does not have an all-access pass. + $this->drupalLogin($this->rootUser); + $this->drupalGet('admin'); + $this->assertSession()->statusCodeEquals(200); + + User::load(1) + ->removeRole('administrator') + ->save(); + // Clear caches so change take effect in system under test. + $this->rebuildAll(); + + $this->drupalGet('admin'); + $this->assertSession()->statusCodeEquals(403); } } diff --git a/core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php b/core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php index 50b8d636eda610c9d4cb73d16f4354c754c811f6..5970133ffcaf0e325d913a17e244ef993d4763d9 100644 --- a/core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php +++ b/core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php @@ -26,6 +26,14 @@ class ClaroTest extends BrowserTestBase { */ protected static $modules = ['dblog', 'shortcut', 'pager_test']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php b/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php index 3cfc77d060a63096ac0ad9ebc965f439518ae247..55d3d19d7da5261356be9a3fcbc074bb6b625b5b 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php @@ -25,6 +25,14 @@ class RouteProviderTest extends KernelTestBase { */ protected static $modules = ['entity_test', 'user', 'system']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php b/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php index 67a755379241e199805669e29bf628650ce8ba60..4420796db31b423a06f0c2d45790abedb1093952 100644 --- a/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php +++ b/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php @@ -21,6 +21,14 @@ class RenderCacheTest extends KernelTestBase { */ protected static $modules = ['user', 'system']; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + /** * {@inheritdoc} */ diff --git a/core/tests/Drupal/KernelTests/Core/Session/SuperUserPermissionsTest.php b/core/tests/Drupal/KernelTests/Core/Session/SuperUserPermissionsTest.php new file mode 100644 index 0000000000000000000000000000000000000000..186e140a2695cf4c52ae1345bf2a20acef9a6187 --- /dev/null +++ b/core/tests/Drupal/KernelTests/Core/Session/SuperUserPermissionsTest.php @@ -0,0 +1,52 @@ +<?php + +namespace Drupal\KernelTests\Core\Session; + +use Drupal\KernelTests\KernelTestBase; +use Drupal\Tests\user\Traits\UserCreationTrait; + +/** + * Test case for getting all permissions as a super user. + * + * @covers \Drupal\Core\DependencyInjection\Compiler\SuperUserAccessPolicyPass + * @group Session + */ +class SuperUserPermissionsTest extends KernelTestBase { + + use UserCreationTrait; + + /** + * {@inheritdoc} + */ + protected static $modules = ['system', 'user']; + + /** + * {@inheritdoc} + */ + protected bool $usesSuperUserAccessPolicy = TRUE; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + $this->installEntitySchema('user'); + } + + /** + * Tests the super user access policy grants all permissions. + */ + public function testPermissionChange(): void { + $account = $this->createUser(); + $this->assertSame('1', $account->id()); + $this->assertTrue($account->hasPermission('administer modules')); + $this->assertTrue($account->hasPermission('non-existent permission')); + + // Turn off the super user access policy and try again. + $this->usesSuperUserAccessPolicy = FALSE; + $this->bootKernel(); + $this->assertFalse($account->hasPermission('administer modules')); + $this->assertFalse($account->hasPermission('non-existent permission')); + } + +} diff --git a/core/tests/Drupal/KernelTests/KernelTestBase.php b/core/tests/Drupal/KernelTests/KernelTestBase.php index 236ddf89a43cadc66f4c4904405c0ee9d42415a5..798a14e3e184c91992b53d171157442444187b17 100644 --- a/core/tests/Drupal/KernelTests/KernelTestBase.php +++ b/core/tests/Drupal/KernelTests/KernelTestBase.php @@ -236,6 +236,15 @@ abstract class KernelTestBase extends TestCase implements ServiceProviderInterfa 'config_test.dynamic.system', ]; + /** + * Set to TRUE to make user 1 a super user. + * + * @see \Drupal\Core\Session\SuperUserAccessPolicy + * + * @var bool + */ + protected bool $usesSuperUserAccessPolicy; + /** * {@inheritdoc} */ @@ -571,6 +580,16 @@ public function register(ContainerBuilder $container) { ->register('cache_factory', 'Drupal\Core\Cache\MemoryBackendFactory') ->addArgument(new Reference('datetime.time')); + // Disable the super user access policy so that we are sure our tests check + // for the right permissions. + if (!isset($this->usesSuperUserAccessPolicy)) { + $test_file_name = (new \ReflectionClass($this))->getFileName(); + // @todo Decide in https://www.drupal.org/project/drupal/issues/3437926 + // how to remove this fallback behavior. + $this->usesSuperUserAccessPolicy = !str_starts_with($test_file_name, $this->root . DIRECTORY_SEPARATOR . 'core'); + } + $container->setParameter('security.enable_super_user', $this->usesSuperUserAccessPolicy); + // Use memory for key value storages to avoid database queries. Store the // key value factory on the test object so that key value storages persist // container rebuilds, otherwise all state data would vanish. diff --git a/core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php b/core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php index 32d411ac1dfc6f3c54e365d6845f338d3ac0f183..fd7dc6c6521326841847b421c38bc39ae19ca87e 100644 --- a/core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php +++ b/core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php @@ -86,6 +86,17 @@ class TestSiteInstallCommand extends Command { */ protected $langcode = 'en'; + /** + * {@inheritdoc} + * + * @todo Remove and fix test to not rely on super user. + * @see https://www.drupal.org/project/drupal/issues/3437620 + */ + public function __construct(string $name = NULL) { + parent::__construct($name); + $this->usesSuperUserAccessPolicy = TRUE; + } + /** * {@inheritdoc} */ diff --git a/sites/default/default.services.yml b/sites/default/default.services.yml index c4b964fc2900e874b344439122f256b227b48a07..239ec7b3a560a03de2d7d8fb8cbf44ef5ca5b7da 100644 --- a/sites/default/default.services.yml +++ b/sites/default/default.services.yml @@ -1,4 +1,8 @@ parameters: + # Toggles the super user access policy. If your website has at least one user + # with the Administrator role, it is advised to set this to false. This allows + # you to make user 1 a regular user, strengthening the security of your site. + security.enable_super_user: true session.storage.options: # Default ini options for sessions. #