From e0570c17732c598237d5adfc9743ea06a00ebc24 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 9 Aug 2018 17:55:19 +0100 Subject: [PATCH] Remove caseworking permission MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What became ‘caseworking view’ is now available to all services. --- app/models.py | 2 -- .../versions/0212_remove_caseworking.py | 23 +++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 migrations/versions/0212_remove_caseworking.py diff --git a/app/models.py b/app/models.py index ae720af72..665761789 100644 --- a/app/models.py +++ b/app/models.py @@ -245,7 +245,6 @@ EMAIL_AUTH = 'email_auth' LETTERS_AS_PDF = 'letters_as_pdf' PRECOMPILED_LETTER = 'precompiled_letter' UPLOAD_DOCUMENT = 'upload_document' -CASEWORKING = 'caseworking' SERVICE_PERMISSION_TYPES = [ EMAIL_TYPE, @@ -258,7 +257,6 @@ SERVICE_PERMISSION_TYPES = [ LETTERS_AS_PDF, PRECOMPILED_LETTER, UPLOAD_DOCUMENT, - CASEWORKING, ] diff --git a/migrations/versions/0212_remove_caseworking.py b/migrations/versions/0212_remove_caseworking.py new file mode 100644 index 000000000..c871a29ff --- /dev/null +++ b/migrations/versions/0212_remove_caseworking.py @@ -0,0 +1,23 @@ +""" + +Revision ID: 0212_remove_caseworking +Revises: 0211_email_branding_update +Create Date: 2018-07-31 18:00:20.457755 + +""" +from alembic import op + + +revision = '0212_remove_caseworking' +down_revision = '0211_email_branding_update' + +PERMISSION_NAME = "caseworking" + + +def upgrade(): + op.execute("delete from service_permissions where permission = '{}'".format(PERMISSION_NAME)) + op.execute("delete from service_permission_types where name = '{}'".format(PERMISSION_NAME)) + + +def downgrade(): + op.execute("insert into service_permission_types values('{}')".format(PERMISSION_NAME))