Skip to content

Commit

Permalink
Merge pull request #923 from bcgov/coodinator_role
Browse files Browse the repository at this point in the history
Account info not visible for Account Coordinator/User -Fixed
  • Loading branch information
saravanpa-aot authored Jul 28, 2020
2 parents dfc1472 + 55d01da commit aa64bf5
Showing 1 changed file with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
"""permission for account coordinators
Revision ID: 32b50299e3a3
Revises: 5659632c7b2a
Create Date: 2020-07-28 15:14:56.380084
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import column, table


# revision identifiers, used by Alembic.
revision = '32b50299e3a3'
down_revision = '5659632c7b2a'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
permissions_table = table('permissions',
column('id', sa.Integer()),
column('membership_type_code', sa.String(length=15)),
column('actions', sa.String(length=100)))

# Insert code values
op.bulk_insert(
permissions_table,
[
{'id': '18', 'membership_type_code': 'USER', 'actions': 'VIEW_ACCOUNT'},
{'id': '19', 'membership_type_code': 'COORDINATOR', 'actions': 'VIEW_ACCOUNT'}
]
)


def downgrade():
op.execute('delete from permissions where id=18')
op.execute('delete from permissions where id=19')

0 comments on commit aa64bf5

Please sign in to comment.