mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where pgAdmin does not open after password reset in server mode. Fixes #6513
This commit is contained in:
parent
c86a2b643a
commit
460fb7ec29
@ -34,3 +34,4 @@ Bug fixes
|
||||
| `Issue #6466 <https://redmine.postgresql.org/issues/6466>`_ - Ensure that the user should be able to add members in Login/Role group while creating it.
|
||||
| `Issue #6478 <https://redmine.postgresql.org/issues/6478>`_ - Fixed duplicate SQL issue for tables with more than one partition.
|
||||
| `Issue #6482 <https://redmine.postgresql.org/issues/6482>`_ - Fixed an issue where the Foreground Color property of server dialog does not work.
|
||||
| `Issue #6513 <https://redmine.postgresql.org/issues/6513>`_ - Fixed an issue where pgAdmin does not open after password reset in server mode.
|
||||
|
@ -25,7 +25,7 @@ from flask import session
|
||||
|
||||
import config
|
||||
from pgadmin.utils import PgAdminModule
|
||||
from pgadmin.utils.constants import KERBEROS
|
||||
from pgadmin.utils.constants import KERBEROS, INTERNAL
|
||||
from pgadmin.utils.csrf import pgCSRFProtect
|
||||
|
||||
from .registry import AuthSourceRegistry
|
||||
@ -120,7 +120,7 @@ class AuthSourceManager():
|
||||
self.form = form
|
||||
self.auth_sources = sources
|
||||
self.source = None
|
||||
self.source_friendly_name = None
|
||||
self.source_friendly_name = INTERNAL
|
||||
self.current_source = None
|
||||
|
||||
def as_dict(self):
|
||||
|
@ -51,6 +51,7 @@ from pgadmin.utils.master_password import validate_master_password, \
|
||||
from pgadmin.model import User
|
||||
from pgadmin.utils.constants import MIMETYPE_APP_JS, PGADMIN_NODE,\
|
||||
INTERNAL, KERBEROS, LDAP, QT_DEFAULT_PLACEHOLDER
|
||||
from pgadmin.authenticate import AuthSourceManager
|
||||
|
||||
try:
|
||||
from flask_security.views import default_render_json
|
||||
@ -1326,6 +1327,9 @@ if hasattr(config, 'SECURITY_RECOVERABLE') and config.SECURITY_RECOVERABLE:
|
||||
|
||||
if not has_error:
|
||||
after_this_request(view_commit)
|
||||
auth_obj = AuthSourceManager(form, [INTERNAL])
|
||||
session['_auth_source_manager_obj'] = auth_obj.as_dict()
|
||||
|
||||
do_flash(*get_message('PASSWORD_RESET'))
|
||||
login_user(user)
|
||||
return redirect(get_url(_security.post_reset_view) or
|
||||
|
Loading…
Reference in New Issue
Block a user