mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
Do not delete schema permission on the table deletion (#8768)
This commit is contained in:
parent
cc49aae245
commit
c3f15b952d
@ -303,18 +303,6 @@ class DeleteMixin(object):
|
|||||||
.all()
|
.all()
|
||||||
)
|
)
|
||||||
|
|
||||||
schema_view_menu = None
|
|
||||||
if hasattr(item, "schema_perm"):
|
|
||||||
schema_view_menu = security_manager.find_view_menu(item.schema_perm)
|
|
||||||
|
|
||||||
pvs.extend(
|
|
||||||
security_manager.get_session.query(
|
|
||||||
security_manager.permissionview_model
|
|
||||||
)
|
|
||||||
.filter_by(view_menu=schema_view_menu)
|
|
||||||
.all()
|
|
||||||
)
|
|
||||||
|
|
||||||
if self.datamodel.delete(item):
|
if self.datamodel.delete(item):
|
||||||
self.post_delete(item)
|
self.post_delete(item)
|
||||||
|
|
||||||
@ -324,9 +312,6 @@ class DeleteMixin(object):
|
|||||||
if view_menu:
|
if view_menu:
|
||||||
security_manager.get_session.delete(view_menu)
|
security_manager.get_session.delete(view_menu)
|
||||||
|
|
||||||
if schema_view_menu:
|
|
||||||
security_manager.get_session.delete(schema_view_menu)
|
|
||||||
|
|
||||||
security_manager.get_session.commit()
|
security_manager.get_session.commit()
|
||||||
|
|
||||||
flash(*self.datamodel.message)
|
flash(*self.datamodel.message)
|
||||||
|
Loading…
Reference in New Issue
Block a user