[ TaoItemsRoles::ITEM_CLASS_NAVIGATOR => [ ['ext' => 'taoItems', 'mod' => 'Items', 'act' => 'editClassLabel'], ['ext' => 'taoItems', 'mod' => 'Items', 'act' => 'getOntologyData'], ['ext' => 'taoItems', 'mod' => 'Items', 'act' => 'index'], ], TaoItemsRoles::ITEM_CLASS_CREATOR => [ ['ext' => 'taoItems', 'mod' => 'Items', 'act' => 'addSubClass'], ], ], SetRolesAccess::CONFIG_PERMISSIONS => [ taoItems_actions_Items::class => [ 'editClassLabel' => [ TaoItemsRoles::ITEM_CLASS_NAVIGATOR => ActionAccessControl::READ, TaoItemsRoles::ITEM_CLASS_EDITOR => ActionAccessControl::WRITE, ], ], ], ]; public function getDescription(): string { return 'Create new item class roles and assign permissions to them'; } public function up(Schema $schema): void { OntologyUpdater::syncModels(); $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, ]); } }