Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added permissions to Quicksight monitoring service layer #1715

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def get_quicksight_designer_url(cls, uri: str):

@staticmethod
def get_monitoring_dashboard_id():
DashboardQuicksightService._check_user_must_be_admin()
current_account = SessionHelper.get_account()
dashboard_id = ParameterStoreManager.get_parameter_value(
AwsAccountId=current_account,
Expand All @@ -87,6 +88,7 @@ def get_monitoring_dashboard_id():

@staticmethod
def get_monitoring_vpc_connection_id():
DashboardQuicksightService._check_user_must_be_admin()
current_account = SessionHelper.get_account()
vpc_connection_id = ParameterStoreManager.get_parameter_value(
AwsAccountId=current_account,
Expand All @@ -103,6 +105,7 @@ def get_monitoring_vpc_connection_id():

@classmethod
def create_quicksight_data_source_set(cls, vpc_connection_id):
cls._check_user_must_be_admin()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do a decorator out of it? It seems to be a critical check everywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge this one and work on the generic decorator. We should also add admin-permission tests in the same way we do with app level permissions and nested resources

client = cls._client()
client.register_user_in_group(group_name='dataall', user_role='AUTHOR')

Expand Down
Loading