mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
[SQL Lab] fix gamma metadata access (#2702)
This commit is contained in:
committed by
GitHub
parent
a471afe206
commit
04748b4cda
@@ -74,11 +74,10 @@ class SupersetTemplateException(SupersetException):
|
||||
|
||||
def can_access(sm, permission_name, view_name, user):
|
||||
"""Protecting from has_access failing from missing perms/view"""
|
||||
return (
|
||||
sm.is_item_public(permission_name, view_name) or
|
||||
(not user.is_anonymous() and
|
||||
sm._has_view_access(user, permission_name, view_name))
|
||||
)
|
||||
if user.is_anonymous():
|
||||
return sm.is_item_public(permission_name, view_name)
|
||||
else:
|
||||
return sm._has_view_access(user, permission_name, view_name)
|
||||
|
||||
|
||||
def flasher(msg, severity=None):
|
||||
|
||||
Reference in New Issue
Block a user