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

permissions: Add curation moderators to RDM record policy #129

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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: 7 additions & 0 deletions invenio_config_tugraz/permissions/policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@

from invenio_administration.generators import Administration
from invenio_communities.generators import CommunityCurators
from invenio_curations.services.generators import (
CurationModerators,
IfCurationRequestExists,
)
from invenio_rdm_records.services.generators import (
AccessGrant,
CommunityInclusionReviewers,
Expand Down Expand Up @@ -80,6 +84,9 @@ class TUGrazRDMRecordPermissionPolicy(RecordPermissionPolicy):
SecretLinks("preview"),
SubmissionReviewer(),
UserManager,
# Allow curation moderators to access a record, if a request for the record exists.
# Since we set all other permission in this policy as well, this only has to be specified here.
IfCurationRequestExists(then_=[CurationModerators()], else_=[]),
]
can_view = can_preview + [
AccessGrant("view"),
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ python_requires = >=3.12
zip_safe = False
install_requires =
invenio-cache>=1.1.1
invenio-curations>=0.1.0
invenio-i18n>=2.0.0
invenio-rdm-records>=4.0.0

Expand Down