Skip to content

Commit fbcd1b8

Browse files
committed
WIP: fix(vcs): remove VCS_INTEGRATION_ENABLED
* We are now distributing this module as an optional dependency rather than pre-bundled with InvenioRDM. So the new way of activating/deactivating the module is installing/uninstalling it. * Also, the default value for `VCS_PROVIDERS` is an empty list, so nothing would be rendered in the UI menu anyway.
1 parent e5f9245 commit fbcd1b8

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

invenio_vcs/ext.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,13 @@ def init_config(self, app):
8686

8787
def finalize_app_ui(app):
8888
"""Finalize app."""
89-
if app.config.get("VCS_INTEGRATION_ENABLED", False):
90-
init_menu(app)
91-
init_webhooks(app)
89+
init_menu(app)
90+
init_webhooks(app)
9291

9392

9493
def finalize_app_api(app):
9594
"""Finalize app."""
96-
if app.config.get("VCS_INTEGRATION_ENABLED", False):
97-
init_webhooks(app)
95+
init_webhooks(app)
9896

9997

10098
def init_menu(app):

invenio_vcs/views/vcs.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ def create_ui_blueprint(app):
6565
template_folder="../templates",
6666
url_prefix="/account/settings/vcs/<provider>",
6767
)
68-
if app.config.get("VCS_INTEGRATION_ENABLED", False):
69-
with app.app_context(): # Todo: Temporary fix, it should be removed when inveniosoftware/invenio-theme#355 is merged
70-
register_ui_routes(blueprint)
68+
with app.app_context(): # Todo: Temporary fix, it should be removed when inveniosoftware/invenio-theme#355 is merged
69+
register_ui_routes(blueprint)
7170
return blueprint
7271

7372

@@ -76,8 +75,7 @@ def create_api_blueprint(app):
7675
blueprint_api = Blueprint(
7776
"invenio_vcs_api", __name__, url_prefix="/user/vcs/<provider>"
7877
)
79-
if app.config.get("VCS_INTEGRATION_ENABLED", False):
80-
register_api_routes(blueprint_api)
78+
register_api_routes(blueprint_api)
8179
return blueprint_api
8280

8381

0 commit comments

Comments
 (0)