In the .install file:
* Replace deprecated code
* Remove unused aliases
* Remove code which gives administrators all permissions as administrators already get all permissions.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

loopduplicate created an issue. See original summary.

loopduplicate’s picture

Status: Active » Needs review
FileSize
4.82 KB
loopduplicate’s picture

  1. +++ b/multilingual_demo.install
    @@ -5,16 +5,17 @@
    -use Drupal\field\Entity\FieldStorageConfig;
    

    Removes unused aliases, adds some new ones, and alphabetizes them all.

  2. +++ b/multilingual_demo.install
    @@ -33,25 +34,22 @@ function multilingual_demo_install() {
    -  // Enable all permissions for the administrator role.
    

    Removes code which gives admins all permissions because admins already have all permissions.

Gábor Hojtsy’s picture

Fine with me if it still works :)

+++ b/multilingual_demo.install
@@ -33,25 +34,22 @@ function multilingual_demo_install() {
-  // Enable all permissions for the administrator role.
-  user_role_grant_permissions('administrator', array_keys(\Drupal::service('user.permissions')->getPermissions()));

Yeah not sure why was this here. It does not seem to be present in standard either.

loopduplicate’s picture

I did a little digging. It used to be in the standard profile.
In Implement admin role as a flag on the role storage, simplify permissions page, remove user_modules_installed, one of the changes was "Always pass all permissions check for [the admin] role."
See http://cgit.drupalcode.org/drupal/diff/core/profiles/standard/standard.install?id=1ee1495

Cheers,
loop

Gábor Hojtsy’s picture

Yay, looks good then :)

Kristen Pol’s picture

I'll do some testing.

Kristen Pol’s picture

Status: Needs review » Reviewed & tested by the community

I tested and it looks good. Marking RTBC.

  • loopduplicate committed ece8f94 on 8.x-1.x
    Issue #2708513 by loopduplicate, Gábor Hojtsy, Kristen Pol: Cleanup...
Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.