File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
invenio_vocabularies/services Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22#
33# Copyright (C) 2020-2021 CERN.
4+ # Copyright (C) 2022 TU Wien.
45#
56# Invenio-Vocabularies is free software; you can redistribute it and/or
67# modify it under the terms of the MIT License; see LICENSE file for more
910"""Vocabulary permissions."""
1011
1112from invenio_records_permissions import RecordPermissionPolicy
12- from invenio_records_permissions .generators import AnyUser , SystemProcess
13+ from invenio_records_permissions .generators import (
14+ AnyUser ,
15+ DisableIfReadOnly ,
16+ SystemProcess ,
17+ )
1318
1419
1520class PermissionPolicy (RecordPermissionPolicy ):
1621 """Permission policy."""
1722
1823 can_search = [SystemProcess (), AnyUser ()]
1924 can_read = [SystemProcess (), AnyUser ()]
20- can_create = [SystemProcess ()]
21- can_update = [SystemProcess ()]
22- can_delete = [SystemProcess ()]
23- can_manage = [SystemProcess ()]
25+ can_create = [SystemProcess (), DisableIfReadOnly () ]
26+ can_update = [SystemProcess (), DisableIfReadOnly () ]
27+ can_delete = [SystemProcess (), DisableIfReadOnly () ]
28+ can_manage = [SystemProcess (), DisableIfReadOnly () ]
You can’t perform that action at this time.
0 commit comments