Skip to content

Commit

Permalink
Return 401 on no authorization
Browse files Browse the repository at this point in the history
(cherry picked from commit 9827925)
  • Loading branch information
betodealmeida authored and youngyjd committed Oct 17, 2018
1 parent a664062 commit fa65b68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2342,7 +2342,7 @@ def results(self, key):
query.sql, query.database, query.schema)
if rejected_tables:
return json_error_response(security_manager.get_table_access_error_msg(
'{}'.format(rejected_tables)))
'{}'.format(rejected_tables)), status=401)

return json_success(utils.zlib_decompress_to_string(blob))

Expand Down Expand Up @@ -2388,7 +2388,8 @@ def sql_json_call(self, request):
if rejected_tables:
return json_error_response(
security_manager.get_table_access_error_msg(rejected_tables),
link=security_manager.get_table_access_link(rejected_tables))
link=security_manager.get_table_access_link(rejected_tables),
status=401)
session.commit()

select_as_cta = request.form.get('select_as_cta') == 'true'
Expand Down

0 comments on commit fa65b68

Please sign in to comment.