Refactor the registry class logic and remove duplicate code for the same functionality.

This commit is contained in:
Ashesh Vashi
2021-06-24 11:30:11 +05:30
committed by Akshay Joshi
parent a53be65ab0
commit 9574f43f87
13 changed files with 334 additions and 148 deletions

View File

@@ -223,7 +223,7 @@ def get_auth_sources(type):
if type in auth_sources:
return auth_sources[type]
auth_source = AuthSourceRegistry.create(type)
auth_source = AuthSourceRegistry.get(type)
if auth_source is not None:
auth_sources[type] = auth_source
@@ -236,7 +236,7 @@ def init_app(app):
auth_sources = dict()
setattr(app, '_pgadmin_auth_sources', auth_sources)
AuthSourceRegistry.load_auth_sources()
AuthSourceRegistry.load_modules(app)
return auth_sources