-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #923 from bcgov/coodinator_role
Account info not visible for Account Coordinator/User -Fixed
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
auth-api/migrations/versions/32b50299e3a3_permission_for_account_coordinators.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') | ||
|