From 55d01da2854ddd6166067929dcd8c7ea03274a75 Mon Sep 17 00:00:00 2001 From: saravanpa-aot Date: Tue, 28 Jul 2020 15:23:30 -0700 Subject: [PATCH] Account info not visible for Account Coordinator/User -Fixed --- ...3a3_permission_for_account_coordinators.py | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 auth-api/migrations/versions/32b50299e3a3_permission_for_account_coordinators.py diff --git a/auth-api/migrations/versions/32b50299e3a3_permission_for_account_coordinators.py b/auth-api/migrations/versions/32b50299e3a3_permission_for_account_coordinators.py new file mode 100644 index 0000000000..d260b142db --- /dev/null +++ b/auth-api/migrations/versions/32b50299e3a3_permission_for_account_coordinators.py @@ -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') +