From 47a91bd1bc0613e1fd1cb6ecdacaa9e5a667735c Mon Sep 17 00:00:00 2001 From: alejandromumo Date: Tue, 11 Jun 2024 13:30:39 +0200 Subject: [PATCH] config: rename enabled flag --- README.rst | 2 +- invenio_jobs/administration/jobs.py | 2 +- invenio_jobs/config.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 592b718..b4138af 100644 --- a/README.rst +++ b/README.rst @@ -37,7 +37,7 @@ Jobs can be managed through the administration view in the Invenio instance. By .. code-block:: python - JOBS_ADMINISTRATION_DISABLED = False + JOBS_ADMINISTRATION_ENABLED = True More Help diff --git a/invenio_jobs/administration/jobs.py b/invenio_jobs/administration/jobs.py index 1773807..f5184fd 100644 --- a/invenio_jobs/administration/jobs.py +++ b/invenio_jobs/administration/jobs.py @@ -47,7 +47,7 @@ class JobsListView(AdminResourceListView): @staticmethod def disabled(): """Disable the view on demand.""" - return current_app.config["JOBS_ADMINISTRATION_DISABLED"] + return not current_app.config["JOBS_ADMINISTRATION_ENABLED"] class JobsDetailsView(AdminResourceListView): diff --git a/invenio_jobs/config.py b/invenio_jobs/config.py index 0f64eae..f878794 100644 --- a/invenio_jobs/config.py +++ b/invenio_jobs/config.py @@ -24,7 +24,7 @@ JOBS_RUNS_PERMISSION_POLICY = RunPermissionPolicy """Permission policy for job runs.""" -JOBS_ADMINISTRATION_DISABLED = True +JOBS_ADMINISTRATION_ENABLED = False """Disable Jobs administration views if ``True``.""" JOBS_FACETS = {}