From 72599e21159c941637936418a65fe1e6a4e11cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Marsza=C5=82?= Date: Mon, 10 Jul 2023 13:26:46 +0200 Subject: [PATCH] fix: revert dac roles --- manifest.php | 7 +-- ...Version202305231521313214_taoDacSimple.php | 52 ------------------- model/DacRoles.php | 2 - model/ontology/dac.rdf | 38 +------------- 4 files changed, 2 insertions(+), 97 deletions(-) delete mode 100644 migrations/Version202305231521313214_taoDacSimple.php diff --git a/manifest.php b/manifest.php index 09998591..e60e1434 100644 --- a/manifest.php +++ b/manifest.php @@ -18,9 +18,7 @@ * Copyright (c) 2014-2022 (original work) Open Assessment Technologies SA; */ -use oat\tao\model\accessControl\func\AccessRule; use oat\taoDacSimple\model\Copy\ServiceProvider\CopyServiceProvider; -use oat\taoDacSimple\model\DacRoles; use oat\taoDacSimple\scripts\install\AttachEventHandler; use oat\taoDacSimple\scripts\update\Updater; use oat\taoDacSimple\scripts\install\SetupDataAccess; @@ -38,10 +36,7 @@ 'acl' => [ ['grant', 'http://www.tao.lu/Ontologies/generis.rdf#taoDacSimpleManager', ['ext' => 'taoDacSimple']], ['grant', 'http://www.tao.lu/Ontologies/TAOItem.rdf#ItemsManagerRole', AdminAccessController::class], - ['grant', 'http://www.tao.lu/Ontologies/TAOTest.rdf#TestsManagerRole', AdminAccessController::class], - [AccessRule::GRANT, DacRoles::RESTRICTED_ITEM_AUTHOR, ['ext' => 'taoItems', 'mod' => 'Items']], - [AccessRule::GRANT, DacRoles::RESTRICTED_ITEM_AUTHOR, ['ext' => 'taoItems', 'mod' => 'ItemExport']], - [AccessRule::GRANT, DacRoles::RESTRICTED_TEST_AUTHOR, ['ext' => 'taoTests', 'mod' => 'Tests']] + ['grant', 'http://www.tao.lu/Ontologies/TAOTest.rdf#TestsManagerRole', AdminAccessController::class] ], 'install' => [ 'php' => [ diff --git a/migrations/Version202305231521313214_taoDacSimple.php b/migrations/Version202305231521313214_taoDacSimple.php deleted file mode 100644 index 19b62c8f..00000000 --- a/migrations/Version202305231521313214_taoDacSimple.php +++ /dev/null @@ -1,52 +0,0 @@ - [ - DacRoles::RESTRICTED_ITEM_AUTHOR => [ - ['ext' => 'taoItems', 'mod' => 'Items'], - ['ext' => 'taoItems', 'mod' => 'ItemExport'] - ], - DacRoles::RESTRICTED_TEST_AUTHOR => [ - ['ext' => 'taoTests', 'mod' => 'Tests'] - ] - ], - ]; - - public function getDescription(): string - { - return 'Add and configure limited results manager'; - } - - 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, - ]); - } -} diff --git a/model/DacRoles.php b/model/DacRoles.php index ff39d6df..4ee0467b 100644 --- a/model/DacRoles.php +++ b/model/DacRoles.php @@ -24,6 +24,4 @@ interface DacRoles { public const DAC_ADMINISTRATOR = 'http://www.tao.lu/Ontologies/TAO.rdf#DacAdministrator'; - public const RESTRICTED_TEST_AUTHOR = 'http://www.tao.lu/Ontologies/TAO.rdf#RestrictedTestAuthor'; - public const RESTRICTED_ITEM_AUTHOR = 'http://www.tao.lu/Ontologies/TAO.rdf#RestrictedItemAuthor'; } diff --git a/model/ontology/dac.rdf b/model/ontology/dac.rdf index 16bb3d68..5bb35fed 100644 --- a/model/ontology/dac.rdf +++ b/model/ontology/dac.rdf @@ -7,49 +7,13 @@ xmlns:widget="http://www.tao.lu/datatypes/WidgetDefinitions.rdf#" xmlns:generis="http://www.tao.lu/Ontologies/generis.rdf#" > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +