{"action":"created","issue":{"url":"https://api.github.com/repos/getredash/redash/issues/1109","repository_url":"https://api.github.com/repos/getredash/redash","labels_url":"https://api.github.com/repos/getredash/redash/issues/1109/labels{/name}","comments_url":"https://api.github.com/repos/getredash/redash/issues/1109/comments","events_url":"https://api.github.com/repos/getredash/redash/issues/1109/events","html_url":"https://github.com/getredash/redash/issues/1109","id":159452679,"number":1109,"title":"Mixed view_only in multiple data_source_groups blocks query executions","user":{"login":"yanenok","id":5149867,"avatar_url":"https://avatars.githubusercontent.com/u/5149867?v=3","gravatar_id":"","url":"https://api.github.com/users/yanenok","html_url":"https://github.com/yanenok","followers_url":"https://api.github.com/users/yanenok/followers","following_url":"https://api.github.com/users/yanenok/following{/other_user}","gists_url":"https://api.github.com/users/yanenok/gists{/gist_id}","starred_url":"https://api.github.com/users/yanenok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanenok/subscriptions","organizations_url":"https://api.github.com/users/yanenok/orgs","repos_url":"https://api.github.com/users/yanenok/repos","events_url":"https://api.github.com/users/yanenok/events{/privacy}","received_events_url":"https://api.github.com/users/yanenok/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-09T16:31:13Z","updated_at":"2016-06-09T17:02:25Z","closed_at":null,"body":"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.\r\n\r\nFor 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.\r\n\r\nThis is caused by `group_level` definition in `def has_access()` in [permissions.py](https://github.com/getredash/redash/blob/master/redash/permissions.py):\r\n\r\n    required_level = 1 if need_view_only else 2\r\n    group_level = 1 if any(flatten([object_groups[group] for group in matching_groups])) else 2\r\n    \r\n    return required_level <= group_level\r\n"},"comment":{"url":"https://api.github.com/repos/getredash/redash/issues/comments/224960071","html_url":"https://github.com/getredash/redash/issues/1109#issuecomment-224960071","issue_url":"https://api.github.com/repos/getredash/redash/issues/1109","id":224960071,"user":{"login":"arikfr","id":71468,"avatar_url":"https://avatars.githubusercontent.com/u/71468?v=3","gravatar_id":"","url":"https://api.github.com/users/arikfr","html_url":"https://github.com/arikfr","followers_url":"https://api.github.com/users/arikfr/followers","following_url":"https://api.github.com/users/arikfr/following{/other_user}","gists_url":"https://api.github.com/users/arikfr/gists{/gist_id}","starred_url":"https://api.github.com/users/arikfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arikfr/subscriptions","organizations_url":"https://api.github.com/users/arikfr/orgs","repos_url":"https://api.github.com/users/arikfr/repos","events_url":"https://api.github.com/users/arikfr/events{/privacy}","received_events_url":"https://api.github.com/users/arikfr/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T17:02:25Z","updated_at":"2016-06-09T17:02:25Z","body":"Thanks!\r\nFixed in #1110."}}
{"actor":{"display_login":"arikfr"}}