mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +00:00
chore: enforce more ruff rules (#31447)
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9da65d6bfd
commit
e51b95ffa8
@@ -1410,7 +1410,7 @@ class SupersetSecurityManager( # pylint: disable=too-many-public-methods
|
||||
:param old_database_name: the old database name
|
||||
:param target: The database object
|
||||
:return: A list of changed view menus (permission resource names)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
view_menu_table = self.viewmenu_model.__table__ # pylint: disable=no-member
|
||||
new_database_name = target.database_name
|
||||
old_view_menu_name = self.get_database_perm(target.id, old_database_name)
|
||||
@@ -1466,7 +1466,7 @@ class SupersetSecurityManager( # pylint: disable=too-many-public-methods
|
||||
:param old_database_name: the old database name
|
||||
:param target: The database object
|
||||
:return: A list of changed view menus (permission resource names)
|
||||
"""
|
||||
""" # noqa: E501
|
||||
from superset.connectors.sqla.models import ( # pylint: disable=import-outside-toplevel
|
||||
SqlaTable,
|
||||
)
|
||||
@@ -2144,7 +2144,7 @@ class SupersetSecurityManager( # pylint: disable=too-many-public-methods
|
||||
"""
|
||||
return []
|
||||
|
||||
def raise_for_access(
|
||||
def raise_for_access( # noqa: C901
|
||||
# pylint: disable=too-many-arguments,too-many-branches,too-many-locals,too-many-statements
|
||||
self,
|
||||
dashboard: Optional["Dashboard"] = None,
|
||||
@@ -2353,7 +2353,7 @@ class SupersetSecurityManager( # pylint: disable=too-many-public-methods
|
||||
|
||||
if dashboard:
|
||||
if self.is_guest_user():
|
||||
# Guest user is currently used for embedded dashboards only. If the guest
|
||||
# Guest user is currently used for embedded dashboards only. If the guest # noqa: E501
|
||||
# user doesn't have access to the dashboard, ignore all other checks.
|
||||
if self.has_guest_access(dashboard):
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user