Skip to content

Commit

Permalink
Merge pull request apache#74 from airbnb/cherrypick_permissions_fixes
Browse files Browse the repository at this point in the history
permissions bug fixes (apache#5559)
  • Loading branch information
timifasubaa committed Aug 3, 2018
2 parents 19bdc0f + 63eb6ee commit fb6b304
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1089,8 +1089,7 @@ def generate_json(self, datasource_type, datasource_id, form_data,
return json_error_response(
security_manager.get_datasource_access_error_msg(viz_obj.datasource),
status=404,
link=security_manager.security_manager.get_datasource_error_link(
viz_obj.datasource))
link=security_manager.get_datasource_access_link(viz_obj.datasource))

if csv:
return CsvResponse(
Expand Down Expand Up @@ -2580,7 +2579,7 @@ def fetch_datasource_metadata(self):
if not security_manager.datasource_access(datasource):
return json_error_response(
security_manager.get_datasource_access_error_msg(datasource),
link=security_manager.get_datasource_error_link(datasource))
link=security_manager.get_datasource_access_link(datasource))
return json_success(json.dumps(datasource.data))

@expose('/queries/<last_updated_ms>')
Expand Down Expand Up @@ -2760,7 +2759,7 @@ def sliceQuery(self, slice_id):
return json_error_response(
security_manager.get_datasource_access_error_msg(viz_obj.datasource),
status=401,
link=security_manager.get_datasource_error_link(viz_obj.datasource))
link=security_manager.get_datasource_access_link(viz_obj.datasource))
return self.get_query_string_response(viz_obj)


Expand Down

0 comments on commit fb6b304

Please sign in to comment.