migrate: invenioRDM v4

deb: bump in app-rdm
This commit is contained in:
mb-wali
2021-05-26 12:02:53 +02:00
committed by Mojib Wali
parent 44e5857143
commit 89f6aee814
3 changed files with 38 additions and 44 deletions

View File

@@ -54,8 +54,6 @@ APP_DEFAULT_SECURE_HEADERS = {
"'unsafe-eval'", "'unsafe-eval'",
"blob:", "blob:",
"ub-support.tugraz.at", # zammad contact form "ub-support.tugraz.at", # zammad contact form
"api.datacite.org/dois", # datacite
"api.test.datacite.org/dois", # datacite test
], ],
}, },
"content_security_policy_report_only": False, "content_security_policy_report_only": False,
@@ -113,19 +111,22 @@ Set this to False when sending actual emails.
# =========== # ===========
# See https://invenio-userprofiles.readthedocs.io/en/latest/configuration.html # See https://invenio-userprofiles.readthedocs.io/en/latest/configuration.html
USERPROFILES_EXTEND_SECURITY_FORMS = False USERPROFILES_EXTEND_SECURITY_FORMS = True
"""Set True in order to register user_profile. """Set True in order to register user_profile.
This also forces user to add username and fullname This also forces user to add username and fullname
when register. when register.
""" """
USERPROFILES_EMAIL_ENABLED = False USERPROFILES_EMAIL_ENABLED = True
"""Exclude the user email in the profile form.""" """Exclude the user email in the profile form."""
# Invenio-shibboleth USERPROFILES_READ_ONLY = True
"""Allow users to change profile info (name, email, etc...)."""
# Invenio-saml
# =========== # ===========
# See https://invenio-shibboleth.readthedocs.io/en/latest/configuration.html # See https://invenio-saml.readthedocs.io/en/latest/configuration.html
SSO_SAML_IDPS = {} SSO_SAML_IDPS = {}
"""Configuration of IDPS. Actual values can be find in to invenio.cfg file""" """Configuration of IDPS. Actual values can be find in to invenio.cfg file"""
@@ -153,13 +154,16 @@ SSO_SAML_DEFAULT_SLS_ROUTE = "/sls/<idp>"
# =========== # ===========
# See https://invenio-accounts.readthedocs.io/en/latest/configuration.html # See https://invenio-accounts.readthedocs.io/en/latest/configuration.html
ACCOUNTS_LOCAL_LOGIN_ENABLED = True
"""Allow local login."""
SECURITY_CHANGEABLE = False SECURITY_CHANGEABLE = False
"""Allow password change by users.""" """Allow password change by users."""
SECURITY_RECOVERABLE = False SECURITY_RECOVERABLE = False
"""Allow password recovery by users.""" """Allow password recovery by users."""
SECURITY_REGISTERABLE = False SECURITY_REGISTERABLE = True
""""Allow users to register. """"Allow users to register.
With this variable set to "False" users will not be With this variable set to "False" users will not be
@@ -228,16 +232,6 @@ password from ``users.yaml`` will be used. If that is also absent, a password
will be generated randomly. will be generated randomly.
""" """
# Custom Access Right
# RDM_RECORDS_CUSTOM_VOCABULARIES = {
# 'access_right': {
# 'path': join(
# dirname(abspath(__file__)),
# 'restrictions', 'access_right', 'access_right_limit.csv'
# )
# }
# }
# Invenio-app-rdm # Invenio-app-rdm
# ========================= # =========================
# See https://github.com/inveniosoftware/invenio-app-rdm/blob/master/invenio_app_rdm/config.py # See https://github.com/inveniosoftware/invenio-app-rdm/blob/master/invenio_app_rdm/config.py

View File

@@ -53,34 +53,34 @@ Using Custom Generator for a policy:
Permissions for Invenio (RDM) Records. Permissions for Invenio (RDM) Records.
""" """
from invenio_rdm_records.services import RDMRecordPermissionPolicy # from invenio_rdm_records.services import RDMRecordPermissionPolicy
from invenio_rdm_records.services.config import RDMRecordServiceConfig # from invenio_rdm_records.services.config import RDMRecordServiceConfig
from invenio_rdm_records.services.generators import IfDraft, IfRestricted, RecordOwners # from invenio_rdm_records.services.generators import IfDraft, IfRestricted, RecordOwners
from invenio_records_permissions.generators import ( # from invenio_records_permissions.generators import (
Admin, # Admin,
AnyUser, # AnyUser,
AuthenticatedUser, # AuthenticatedUser,
Disable, # Disable,
SuperUser, # SuperUser,
SystemProcess, # SystemProcess,
) # )
class TUGRAZPermissionPolicy(RDMRecordPermissionPolicy): # class TUGRAZPermissionPolicy(RDMRecordPermissionPolicy):
"""Access control configuration for rdm records. # """Access control configuration for rdm records.
This overrides the origin: # This overrides the origin:
https://github.com/inveniosoftware/invenio-rdm-records/blob/master/invenio_rdm_records/services/permissions.py. # https://github.com/inveniosoftware/invenio-rdm-records/blob/master/invenio_rdm_records/services/permissions.py.
Access control configuration for records. # Access control configuration for records.
Note that even if the array is empty, the invenio_access Permission class # Note that even if the array is empty, the invenio_access Permission class
always adds the ``superuser-access``, so admins will always be allowed. # always adds the ``superuser-access``, so admins will always be allowed.
- Create action given to everyone for now. # - Create action given to everyone for now.
- Read access given to everyone if public record and given to owners # - Read access given to everyone if public record and given to owners
always. (inherited) # always. (inherited)
- Update access given to record owners. (inherited) # - Update access given to record owners. (inherited)
- Delete access given to admins only. (inherited) # - Delete access given to admins only. (inherited)
""" # """
class TUGRAZRDMRecordServiceConfig(RDMRecordServiceConfig): # class TUGRAZRDMRecordServiceConfig(RDMRecordServiceConfig):
"""Overriding BibliographicRecordServiceConfig.""" # """Overriding BibliographicRecordServiceConfig."""

View File

@@ -54,7 +54,7 @@ setup_requires = [
install_requires = [ install_requires = [
"Flask-BabelEx>=0.9.4", "Flask-BabelEx>=0.9.4",
# keep this in sync with invenioRDM release # keep this in sync with invenioRDM release
"invenio_app_rdm==3.0.0", "invenio_app_rdm==4.0.0",
] ]
packages = find_packages() packages = find_packages()