mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Add ‘caseworking’ service permission
We want to add the option for a user to have a more restricted view of Notify. This should be opt in/out on a per service basis, because it will be appropriate only for a minority of teams. It shouldn’t be the default because most teams (those without a lot of users or those only using the API) won’t need it. So this commit adds it as a new service permission, which means we can roll it out: - in prototype form initially - then as an opt-in service setting
This commit is contained in:
26
migrations/versions/0198_add_caseworking_permission.py
Normal file
26
migrations/versions/0198_add_caseworking_permission.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 0198_add_caseworking_permission
|
||||
Revises: 0197_service_contact_link
|
||||
Create Date: 2018-02-21 12:05:00
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0198_add_caseworking_permission'
|
||||
down_revision = '0197_service_contact_link'
|
||||
|
||||
from alembic import op
|
||||
|
||||
PERMISSION_NAME = "caseworking"
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.get_bind()
|
||||
op.execute("insert into service_permission_types values('{}')".format(PERMISSION_NAME))
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.get_bind()
|
||||
op.execute("delete from service_permissions where permission = '{}'".format(PERMISSION_NAME))
|
||||
op.execute("delete from service_permission_types where name = '{}'".format(PERMISSION_NAME))
|
||||
Reference in New Issue
Block a user