[ TaoItemsRoles::ITEM_PREVIEWER => [ ['ext' => 'taoQtiTestPreviewer', 'mod' => 'Previewer', 'act' => 'asset'], ], ], ]; private const REVOKE_CONFIG = [ SetRolesAccess::CONFIG_RULES => [ TaoItemsRoles::ITEM_CONTENT_CREATOR => [ ['ext' => 'taoQtiTestPreviewer', 'mod' => 'Previewer', 'act' => 'asset'], ], ], ]; public function getDescription(): string { return 'Assign permissions to Item Previewer role'; } public function up(Schema $schema): void { $setRolesAccess = $this->propagate(new SetRolesAccess()); $setRolesAccess([ '--' . SetRolesAccess::OPTION_REVOKE, '--' . SetRolesAccess::OPTION_CONFIG, self::REVOKE_CONFIG, ]); $setRolesAccess = $this->propagate(new SetRolesAccess()); $setRolesAccess([ '--' . SetRolesAccess::OPTION_CONFIG, self::CONFIG, ]); } public function down(Schema $schema): void { $setRolesAccess = $this->propagate(new SetRolesAccess()); $setRolesAccess([ '--' . SetRolesAccess::OPTION_REVOKE, '--' . SetRolesAccess::OPTION_CONFIG, self::CONFIG, ]); $setRolesAccess = $this->propagate(new SetRolesAccess()); $setRolesAccess([ '--' . SetRolesAccess::OPTION_CONFIG, self::REVOKE_CONFIG, ]); } }