mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-26 02:30:21 -06:00
Fixed an issue where shared server entries not getting deleted from SQLite database if the user gets deleted. Fixes #6143
This commit is contained in:
parent
3e09f1bf40
commit
57ed02a9aa
@ -52,4 +52,5 @@ Bug fixes
|
||||
| `Issue #6122 <https://redmine.postgresql.org/issues/6122>`_ - Added informative message when there is no difference found for schema diff.
|
||||
| `Issue #6128 <https://redmine.postgresql.org/issues/6128>`_ - Fixed an issue where sequences are not created.
|
||||
| `Issue #6140 <https://redmine.postgresql.org/issues/6140>`_ - Ensure that verbose logs should be visible for Utility(Backup, Maintenance) jobs.
|
||||
| `Issue #6143 <https://redmine.postgresql.org/issues/6143>`_ - Fixed an issue where shared server entries not getting deleted from SQLite database if the user gets deleted.
|
||||
| `Issue #6144 <https://redmine.postgresql.org/issues/6144>`_ - Ensure that the current value of the sequence should be ignored while comparing using schema diff.
|
||||
|
@ -28,7 +28,7 @@ from pgadmin.utils.constants import MIMETYPE_APP_JS, INTERNAL,\
|
||||
SUPPORTED_AUTH_SOURCES, KERBEROS
|
||||
from pgadmin.utils.validation_utils import validate_email
|
||||
from pgadmin.model import db, Role, User, UserPreference, Server, \
|
||||
ServerGroup, Process, Setting
|
||||
ServerGroup, Process, Setting, SharedServer
|
||||
|
||||
# set template path for sql scripts
|
||||
MODULE_NAME = 'user_management'
|
||||
@ -347,6 +347,8 @@ def delete(uid):
|
||||
|
||||
Process.query.filter_by(user_id=uid).delete()
|
||||
|
||||
SharedServer.query.filter_by(user_id=uid).delete()
|
||||
|
||||
# Finally delete user
|
||||
db.session.delete(usr)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user