-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes for subscription to project or everything (#1896)
* updates on engagement publish * update email template * adding action drop down * updated changes for User Management * access user details page for users without a role * updating variable name * updating the schema * updating as per review comments * updating schema * adding changes for clone and delete * fixing linting * update * fix for report setting on analytics * fixing lint * Adding Viewer role changes * Changes for subscription to project or everything * removing changes for viewer role * updating feedbacks
- Loading branch information
1 parent
80fd232
commit 8e2df2e
Showing
18 changed files
with
224 additions
and
18 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
met-api/migrations/versions/5a1258a76598_add_subscribe_to_project.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,31 @@ | ||
"""add_subscribe_to_project | ||
Revision ID: 5a1258a76598 | ||
Revises: 0329d7d10a5f | ||
Create Date: 2023-07-26 11:54:08.922003 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '5a1258a76598' | ||
down_revision = '0329d7d10a5f' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.execute('CREATE TYPE subscriptiontype AS ENUM (\'ENGAGEMENT\', \'PROJECT\', \'TENANT\');') | ||
op.add_column('subscription', sa.Column('project_id', sa.String(length=50), nullable=True)) | ||
op.add_column('subscription', sa.Column('type', sa.Enum('ENGAGEMENT', 'PROJECT', 'TENANT', name='subscriptiontype'), nullable=True)) | ||
# ### end Alembic commands ### | ||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column('subscription', 'type') | ||
op.drop_column('subscription', 'project_id') | ||
op.execute("""DROP TYPE subscriptiontype""") | ||
# ### end Alembic commands ### |
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,30 @@ | ||
# Copyright © 2021 Province of British Columbia | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the 'License'); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an 'AS IS' BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
"""Constants for subscription.""" | ||
from enum import IntEnum | ||
|
||
|
||
class SubscriptionType(IntEnum): | ||
"""Enum of Subscription Type. | ||
User is able to subscribe to various notifications from the application. Subscription Type helps determine | ||
the subscription user has chosen. | ||
ENGAGEMENT - Provides user with notification on a particular engagement | ||
PROJECT - Provides user with notification on all engagements within a particular project | ||
TENANT - Provides user with notification on all engagements within a tenant | ||
""" | ||
|
||
ENGAGEMENT = 1 | ||
PROJECT = 2 | ||
TENANT = 3 |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.