mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Added support to connect PostgreSQL servers via Kerberos authentication. Fixes #6158
This commit is contained in:
committed by
Akshay Joshi
parent
aa9a4c30d3
commit
72f3730c34
@@ -50,7 +50,7 @@ from pgadmin.utils.master_password import validate_master_password, \
|
||||
set_crypt_key, process_masterpass_disabled
|
||||
from pgadmin.model import User
|
||||
from pgadmin.utils.constants import MIMETYPE_APP_JS, PGADMIN_NODE,\
|
||||
INTERNAL, KERBEROS
|
||||
INTERNAL, KERBEROS, LDAP
|
||||
|
||||
try:
|
||||
from flask_security.views import default_render_json
|
||||
@@ -197,7 +197,8 @@ class BrowserModule(PgAdminModule):
|
||||
for name, script in [
|
||||
[PGADMIN_BROWSER, 'js/browser'],
|
||||
['pgadmin.browser.endpoints', 'js/endpoints'],
|
||||
['pgadmin.browser.error', 'js/error']
|
||||
['pgadmin.browser.error', 'js/error'],
|
||||
['pgadmin.browser.constants', 'js/constants']
|
||||
]:
|
||||
scripts.append({
|
||||
'name': name,
|
||||
@@ -864,6 +865,18 @@ def exposed_urls():
|
||||
)
|
||||
|
||||
|
||||
@blueprint.route("/js/constants.js")
|
||||
@pgCSRFProtect.exempt
|
||||
def app_constants():
|
||||
return make_response(
|
||||
render_template('browser/js/constants.js',
|
||||
INTERNAL=INTERNAL,
|
||||
LDAP=LDAP,
|
||||
KERBEROS=KERBEROS),
|
||||
200, {'Content-Type': MIMETYPE_APP_JS}
|
||||
)
|
||||
|
||||
|
||||
@blueprint.route("/js/error.js")
|
||||
@pgCSRFProtect.exempt
|
||||
@login_required
|
||||
|
||||
Reference in New Issue
Block a user