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

Mixed view_only in multiple data_source_groups blocks query executions #1109

Closed
yanenok opened this issue Jun 9, 2016 · 1 comment
Closed

Comments

@yanenok
Copy link
Contributor

yanenok commented Jun 9, 2016

A user belonging to multiple groups that have access to one data source but with different access levels can not execute queries on that data source.

For example, if a user belongs to built-in default group and you have set view_only for all data sources in this group to true, adding this user to a new group to allow full access to one of the data sources will not work.

This is caused by group_level definition in def has_access() in permissions.py:

required_level = 1 if need_view_only else 2
group_level = 1 if any(flatten([object_groups[group] for group in matching_groups])) else 2

return required_level <= group_level
@arikfr arikfr closed this as completed in 0c7f0c2 Jun 9, 2016
arikfr added a commit that referenced this issue Jun 9, 2016
Fix #1109: mixed group permissions resulting in wrong permission
@arikfr
Copy link
Member

arikfr commented Jun 9, 2016

Thanks!
Fixed in #1110.

@arikfr arikfr reopened this Jun 9, 2016
@arikfr arikfr closed this as completed Jun 9, 2016
simo7 pushed a commit to pubnative/redash that referenced this issue Sep 22, 2016
simo7 pushed a commit to pubnative/redash that referenced this issue Sep 22, 2016
Fix getredash#1109: mixed group permissions resulting in wrong permission
dairyo pushed a commit to KiiCorp/redash that referenced this issue Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants