# OpenRiC Workspace - OpenRiC Workspace Permissions.
# Copyright (C) 2026 Johan Pieterse / Plain Sailing Information Systems
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# What an account may do. Code checks a permission IRI; which roles hold it is data. Anything not granted is denied.

@prefix skos:    <http://www.w3.org/2004/02/skos/core#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix v:       <https://workspace.openric.org/vocab/permission/> .

v: a skos:ConceptScheme ;
    dcterms:title "OpenRiC Workspace Permissions"@en ;
    dcterms:description "Actions a role or an account may be granted or denied, on a kind of record, at the scope of everything, one repository or one record. Anything not granted is denied, and a denial wins over a grant at the same scope (ADR 0005)."@en ;
    dcterms:issued "2026-10-19"^^xsd:date ;
    skos:hasTopConcept v:manage-institution, v:manage-accounts, v:view-audit-log, v:describe, v:review, v:publish, v:manage-roles, v:manage-workflows, v:manage-privacy, v:manage-shop, v:manage-reading-room, v:review-submissions, v:read, v:create, v:update, v:delete, v:view-draft, v:read-master, v:read-reference, v:read-thumbnail, v:translate, v:review-proposals, v:review-access-requests .

v:manage-institution a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Manage institution"@en ;
    skos:definition "Change the institution settings."@en .

v:manage-accounts a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Manage accounts"@en ;
    skos:definition "Create accounts, change them, and grant or revoke roles."@en .

v:view-audit-log a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "View audit log"@en ;
    skos:definition "Read the audit log of the institution."@en .

v:describe a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    owl:deprecated true ;
    dcterms:isReplacedBy v:update ;
    skos:prefLabel "Describe"@en ;
    skos:definition "Create and edit descriptions, relations and their evidence."@en .

v:review a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    owl:deprecated true ;
    dcterms:isReplacedBy v:view-draft ;
    skos:prefLabel "Review"@en ;
    skos:definition "Approve or return described material."@en .

v:publish a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Publish"@en ;
    skos:definition "Publish or withdraw approved material."@en .

v:manage-roles a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Manage roles"@en ;
    skos:scopeNote "Administrative; Heratio admin ACL pages."@en ;
    skos:definition "Create and change roles, their members and their permissions."@en .

v:manage-workflows a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Manage workflows"@en ;
    skos:scopeNote "Administrative; Heratio's workflow administration (ahg-workflow, admin only)."@en ;
    skos:definition "Create and change workflows and their steps."@en .

v:manage-privacy a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Manage privacy"@en, "Bestuur privaatheid"@af ;
    skos:scopeNote "Administrative; Heratio's privacy administration (ahg-privacy): the Information Officer's work."@en ;
    skos:definition "Keep the privacy registers: Information Officers, processing, impact assessments, consent, requests, complaints and security compromises."@en .

v:manage-shop a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Manage shop"@en, "Bestuur winkel"@af ;
    skos:scopeNote "Administrative; Heratio's e-commerce administration (ahg-cart, admin only)."@en ;
    skos:definition "Set up the shop, its products and prices and PayFast, and handle its orders."@en .

v:manage-reading-room a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Manage the reading room"@en, "Bestuur die leeskamer"@af ;
    skos:scopeNote "Administrative; Heratio's research administration (ahg-research, research staff)."@en ;
    skos:definition "Approve researchers, run the reading rooms, their seats, bookings, walk-ins, equipment, retrieval and custody of what is asked for."@en .

v:review-submissions a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Review researcher submissions"@en, "Hersien navorserinsendings"@af ;
    skos:scopeNote "Administrative; Heratio's researcher submissions (ahg-researcher-manage)."@en ;
    skos:definition "Review what researchers submit: comment, return, approve or reject it, and publish what is approved into the catalogue."@en .

v:read a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Read"@en ;
    skos:scopeNote "Heratio ACL action read."@en ;
    skos:definition "See a record."@en .

v:create a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Create"@en ;
    skos:scopeNote "Heratio ACL action create."@en ;
    skos:definition "Create a record of this kind."@en .

v:update a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Update"@en ;
    skos:scopeNote "Heratio ACL action update."@en ;
    skos:definition "Change a record in its original language."@en .

v:delete a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Delete"@en ;
    skos:scopeNote "Heratio ACL action delete."@en ;
    skos:definition "Remove a record."@en .

v:view-draft a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "View draft"@en ;
    skos:scopeNote "Heratio ACL action viewDraft."@en ;
    skos:definition "See values that are not yet published."@en .

v:read-master a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Access master"@en ;
    skos:scopeNote "Heratio ACL action readMaster."@en ;
    skos:definition "Open the master file of a digital object."@en .

v:read-reference a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Access reference"@en ;
    skos:scopeNote "Heratio ACL action readReference."@en ;
    skos:definition "Open the reference copy of a digital object."@en .

v:read-thumbnail a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Access thumbnail"@en ;
    skos:scopeNote "Heratio ACL action readThumbnail."@en ;
    skos:definition "See the thumbnail of a digital object."@en .

v:translate a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Translate"@en ;
    skos:scopeNote "Heratio ACL action translate."@en ;
    skos:definition "Add or change values in another language than the original, in the languages the role may translate into."@en .

v:review-proposals a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Review proposals"@en ;
    skos:scopeNote "Heratio's AI review screens, and the API's list of everyone's proposals (ADR 0007). Not the deprecated Review, which meant approving described material."@en ;
    skos:definition "See everyone's proposals for a record, and accept, change or reject them."@en .

v:review-access-requests a skos:Concept ;
    skos:inScheme v: ;
    skos:topConceptOf v: ;
    skos:prefLabel "Review access requests"@en ;
    skos:scopeNote "Heratio's access request approvers (access_request_approver, ahg-access-request): those who hold it are told of each new request for a file of the records they may review, and approve or refuse it (roadmap phase 7)."@en ;
    skos:definition "See the requests for files that are available on request, and approve them for a time or refuse them."@en .
