mirror of
https://github.com/Cian-H/invenio-config-iform.git
synced 2025-12-23 05:21:57 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b33c7e09c3 | ||
|
|
0c775851d8 | ||
|
|
89f6aee814 | ||
|
|
44e5857143 | ||
|
|
460de9fc35 |
@@ -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
|
||||||
|
|||||||
@@ -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."""
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright (C) 2020 Mojib Wali.
|
# Copyright (C) 2020-2021 Graz University of Technology.
|
||||||
#
|
#
|
||||||
# invenio-config-tugraz is free software; you can redistribute it and/or
|
# invenio-config-tugraz is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the MIT License; see LICENSE file for more
|
# modify it under the terms of the MIT License; see LICENSE file for more
|
||||||
@@ -12,4 +12,4 @@ This file is imported by ``invenio_config_tugraz.__init__``,
|
|||||||
and parsed by ``setup.py``.
|
and parsed by ``setup.py``.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = "0.5.8"
|
__version__ = "0.6.0"
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user