Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert changes introducing new roles for item and test authors #233

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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' => [
Expand Down
52 changes: 0 additions & 52 deletions migrations/Version202305231521313214_taoDacSimple.php

This file was deleted.

2 changes: 0 additions & 2 deletions model/DacRoles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
38 changes: 1 addition & 37 deletions model/ontology/dac.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,13 @@
xmlns:widget="http://www.tao.lu/datatypes/WidgetDefinitions.rdf#"
xmlns:generis="http://www.tao.lu/Ontologies/generis.rdf#"
>
<rdf:Description rdf:about="http://www.tao.lu/Ontologies/TAOItem.rdf#AclRoles">
<rdfs:subClassOf rdf:resource="http://www.tao.lu/Ontologies/generis.rdf#UserRole"/>
<rdfs:label xml:lang="en-US"><![CDATA[ACL Roles]]></rdfs:label>
<rdfs:comment xml:lang="en-US"><![CDATA[ACL Roles Class]]></rdfs:comment>
</rdf:Description>
<rdf:Description rdf:about="http://www.tao.lu/Ontologies/TAO.rdf#DacAdministrator">
<rdf:type rdf:resource="http://www.tao.lu/Ontologies/generis.rdf#UserRole"/>
<rdfs:label xml:lang="en-US"><![CDATA[Data Access Administrator]]></rdfs:label>
<rdfs:comment xml:lang="en-US"><![CDATA[Data Access Administrator role]]></rdfs:comment>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAO.rdf#BackOfficeRole"/>
</rdf:Description>
<rdf:Description rdf:about="http://www.tao.lu/Ontologies/TAO.rdf#RestrictedItemAuthor">
<rdf:type rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#AclRoles"/>
<rdfs:label xml:lang="en-US"><![CDATA[Restricted Item Author]]></rdfs:label>
<rdfs:comment xml:lang="en-US"><![CDATA[Limited Access to ACL]]></rdfs:comment>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAO.rdf#PropertyManagerRole"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAO.rdf#BackOfficeRole"/>
<!-- Item Actions Roles-->
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#AbstractItemAuthor"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#AbstractItemAuthor"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#ItemClassNavigatorRole"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#ItemClassEditorRole"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#ItemClassCreatorRole"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#ItemClassSchemaManagerRole"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#ItemViewerRole"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#ItemReplicatorRole"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#ItemPreviewerRole"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#ItemPropertiesEditorRole"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#ItemContentCreatorRole"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#ItemResourceCreatorRole"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#ItemImporterRole"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#ItemDeleterRole"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAO.rdf#RestPublisher"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#ItemContentCreatorRole"/>
</rdf:Description>
<rdf:Description rdf:about="http://www.tao.lu/Ontologies/TAO.rdf#RestrictedTestAuthor">
<rdf:type rdf:resource="http://www.tao.lu/Ontologies/TAOItem.rdf#AclRoles"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAO.rdf#PropertyManagerRole"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/generis.rdf#TestXMLEditor"/>
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOTest.rdf#TaoQtiManagerRole"/>
<rdfs:label xml:lang="en-US"><![CDATA[Restricted Test Author]]></rdfs:label>
<rdfs:comment xml:lang="en-US"><![CDATA[Test Author with limitation for ACL]]></rdfs:comment>
</rdf:Description>

<!-- Add DacAdministrator role to SysAdmin -->
<rdf:Description rdf:about="http://www.tao.lu/Ontologies/TAO.rdf#SysAdminRole">
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAO.rdf#DacAdministrator"/>
Expand Down