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

Post PR updates #79

Merged
merged 8 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
3 changes: 0 additions & 3 deletions hq_superset/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
]

CAN_WRITE_PERMISSION = "can_write"
CAN_EDIT_PERMISSION = "can_edit"
CAN_ADD_PERMISSION = "can_add"
CAN_DELETE_PERMISSIONS = "can_delete"


READ_ONLY_MENU_PERMISSIONS = {
Expand Down
2 changes: 1 addition & 1 deletion hq_superset/hq_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ def datasource_unsubscribe(domain, datasource_id):


def user_domain_roles(domain):
return f"a/{domain}/api/analytics-roles/v1"
return f"a/{domain}/api/analytics-roles/v1/"
5 changes: 1 addition & 4 deletions hq_superset/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,7 @@ def sync_domain_role(self, domain):
The user gets assigned at least 3 roles in order to function on any domain:
1. hq_user_role: gives access to superset platform
2. domain_schema_role: restricts user access to specific domain schema
3. domain_user_role: restricts access for particular user on domain in accordance with how the permissions
are defined on CommCare HQ.

Any additional roles defined on CommCare HQ will also be assigned to the user.
3. Either the Gamma role for "edit" users or the READ_ONLY_ROLE_NAME for "view only" user
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: what is an "edit" user? or "view only" user? in terms of CCA

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"""
hq_user_role = self._ensure_hq_user_role()
domain_schema_role = self._create_domain_role(domain)
Expand Down