Skip to content

Commit

Permalink
update error message to highlight possible access revoke
Browse files Browse the repository at this point in the history
  • Loading branch information
mkangia committed Nov 7, 2024
1 parent e98e66b commit da46257
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions hq_superset/hq_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ def _perform_sync_domain_role():
def _sync_domain_role():
if not DomainSyncUtil(superset.appbuilder.sm).sync_domain_role(g.hq_domain):
error_message = (
f"We couldn't refresh your permissions to access the domain '{g.hq_domain}'. "
f"Please select the project space again or login again to resolve. "
f"If issue persists, please submit a support request."
f"Either your permissions for the project '{g.hq_domain}' were revoked or "
"your permissions failed to refresh. "
"Please select the project space again or login again to resolve. "
"If issue persists, please submit a support request."
)
return current_app.response_class(
response=error_message,
Expand Down
3 changes: 2 additions & 1 deletion hq_superset/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ def test_sync_user_domain_before_request(self, *args):

self.assertEqual(
response.text,
"We couldn't refresh your permissions to access the domain 'test1'. "
"Either your permissions for the project 'test1' were revoked or "
"your permissions failed to refresh. "
"Please select the project space again or login again to resolve. "
"If issue persists, please submit a support request."
)
Expand Down

0 comments on commit da46257

Please sign in to comment.