Internal: Migration: Set missing ROLE_ADMIN role to first admin user

pull/5292/head
Angel Fernando Quiroz Campos 2 years ago
parent b2faa61c35
commit 655b891a5c
  1. 1
      src/CoreBundle/Migrations/Schema/V200/Version20201212114910.php

@ -33,6 +33,7 @@ final class Version20201212114910 extends AbstractMigrationChamilo
$userList = [];
// Adding first admin as main creator also adding to the resource node tree.
$admin = $this->getAdmin();
$admin->addRole('ROLE_ADMIN');
$adminId = $admin->getId();
$userList[$adminId] = $admin;

Loading…
Cancel
Save