Skip to content

Commit

Permalink
chore: change security error level (#28641)
Browse files Browse the repository at this point in the history
  • Loading branch information
eschutho authored Jun 5, 2024
1 parent eef7828 commit bb9f326
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions superset/security/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def get_dashboard_access_error_object( # pylint: disable=invalid-name
return SupersetError(
error_type=SupersetErrorType.DASHBOARD_SECURITY_ACCESS_ERROR,
message="You don't have access to this dashboard.",
level=ErrorLevel.ERROR,
level=ErrorLevel.WARNING,
)

def get_chart_access_error_object(
Expand All @@ -567,7 +567,7 @@ def get_chart_access_error_object(
return SupersetError(
error_type=SupersetErrorType.CHART_SECURITY_ACCESS_ERROR,
message="You don't have access to this chart.",
level=ErrorLevel.ERROR,
level=ErrorLevel.WARNING,
)

@staticmethod
Expand Down Expand Up @@ -609,7 +609,7 @@ def get_datasource_access_error_object( # pylint: disable=invalid-name
return SupersetError(
error_type=SupersetErrorType.DATASOURCE_SECURITY_ACCESS_ERROR,
message=self.get_datasource_access_error_msg(datasource),
level=ErrorLevel.ERROR,
level=ErrorLevel.WARNING,
extra={
"link": self.get_datasource_access_link(datasource),
"datasource": datasource.name,
Expand Down Expand Up @@ -638,7 +638,7 @@ def get_table_access_error_object(self, tables: set["Table"]) -> SupersetError:
return SupersetError(
error_type=SupersetErrorType.TABLE_SECURITY_ACCESS_ERROR,
message=self.get_table_access_error_msg(tables),
level=ErrorLevel.ERROR,
level=ErrorLevel.WARNING,
extra={
"link": self.get_table_access_link(tables),
"tables": [str(table) for table in tables],
Expand Down Expand Up @@ -2257,7 +2257,7 @@ def raise_for_access(
SupersetError(
error_type=SupersetErrorType.DASHBOARD_SECURITY_ACCESS_ERROR,
message=_("Guest user cannot modify chart payload"),
level=ErrorLevel.ERROR,
level=ErrorLevel.WARNING,
)
)

Expand Down

0 comments on commit bb9f326

Please sign in to comment.