*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Verified Commit f704d5dd authored by Tsepelakis, Sotirios's avatar Tsepelakis, Sotirios 🎯
Browse files

Format code with Black

* Fixes errors caught by pytest-black
parent 83f1a2ae
No related branches found
No related tags found
1 merge request!80Add test cases
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020-2022 TU Wien.
# Copyright (C) 2020-2024 TU Wien.
#
# Invenio-Theme-TUW is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
......@@ -46,7 +46,7 @@ master_doc = "index"
# General information about the project.
project = "Invenio-Theme-TUW"
copyright = "2020, TU Wien"
copyright = "2020-2024, TU Wien"
author = "TU Wien"
# The version info for the project you're documenting, acts as replacement for
......@@ -108,10 +108,11 @@ html_theme = "alabaster"
html_theme_options = {
"description": "TU Wien theme for Invenio (RDM).",
"gitlab_user": "fairdata",
"gitlab_repo": "invenio-theme-tuw",
"gitlab_button": False,
"gitlab_banner": True,
# NOTE: gitlab variables are not supported
# "gitlab_user": "fairdata",
# "gitlab_repo": "invenio-theme-tuw",
# "gitlab_button": False,
# "gitlab_banner": True,
"show_powered_by": False,
"extra_nav_links": {
"invenio-theme-tuw@GitLab": "https://gitlab.tuwien.ac.at/fairdata/invenio-theme-tuw",
......
......@@ -121,7 +121,6 @@ def get_name_of_user_owner(owner):
def create_blueprint(app):
"""Create a blueprint with routes and resources."""
blueprint = Blueprint(
"invenio_theme_tuw",
__name__,
......@@ -277,20 +276,19 @@ def create_blueprint(app):
@app.before_first_request
def override_deposit_pages():
"""Override the existing view functions with more access control."""
# we have some additional role-based permissions (trusted-user) that decide
# among other things if people can create records/drafts
# this is not considered in the original view functions, which is why we
# currently need to wrap them with our own guards
app.view_functions[
"invenio_app_rdm_records.deposit_edit"
] = guarded_deposit_edit
app.view_functions[
"invenio_app_rdm_records.deposit_create"
] = guarded_deposit_create
app.view_functions[
"invenio_communities.communities_new"
] = guarded_communities_create
app.view_functions["invenio_app_rdm_records.deposit_edit"] = (
guarded_deposit_edit
)
app.view_functions["invenio_app_rdm_records.deposit_create"] = (
guarded_deposit_create
)
app.view_functions["invenio_communities.communities_new"] = (
guarded_communities_create
)
# limit the amount of contact requests that can be made per time period
# (this needs to be done after the Flask-Limiter extension has been init.)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment