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 = {}