Commit Graph
12 Commits
Author SHA1 Message Date
dev-hari-prasad 2de30f25c0 Gate external auth providers behind SERVER_MODE in desktop mode (#10240)
Desktop mode has no use for the kerberos, ldap, mfa, oauth2 or webserver
authentication providers: AUTHENTICATION_SOURCES defaults to internal, MFA is
inert because mfa_enabled() requires SERVER_MODE, and get_logout_url() already
guards its kerberos and oauth2 branches on SERVER_MODE. So skip importing and
initialising them unless SERVER_MODE is set, leaving desktop mode with
internal authentication alone.

The accompanying test needed wiring into our own runner before it would ever
execute: web/pgadmin/authenticate/tests/ had no __init__.py, so pkgutil did
not report it and find_modules() never reached the module, and the test class
derived from unittest.TestCase rather than BaseTestGenerator, so the
TestsGeneratorRegistry metaclass never registered it and get_suite() could not
pick it up. Both are fixed here, and the two scenarios now run and pass under
regression/runtests.py.

The test no longer asserts that pgadmin.authenticate.mfa is absent from
sys.modules in desktop mode, because it is not: both pgadmin/browser/__init__
and pgadmin/user_login_check import pgadmin.authenticate.mfa.utils
unconditionally. The original assertion only held because the test itself
popped the module first.
2026-08-17 13:39:59 +01:00
Akshay Joshi 52daa56a04 Copyright updated for 2026 2026-01-05 13:33:45 +05:30
Akshay Joshi 964d211260 Copyright updated for 2025 2025-01-01 11:26:42 +05:30
Akshay Joshi 740ce15bd7 Update copyright notices for 2024 2024-01-01 14:13:48 +05:30
Akshay Joshi 98184e5835 Update copyright notices for 2023 2023-01-02 11:53:55 +05:30
Aditya Toshniwal cb635f6706 Removing dynamic module loading and replacing it with static loading. Fixes #7492
Gets rid of all occurrences and usage of get_own_javascripts since it is no longer used.
2022-06-30 11:06:50 +05:30
Akshay Joshi 2786f7ac5a Update copyright notices for 2022 2022-01-04 13:54:25 +05:30
Ashesh Vashi 9574f43f87 Refactor the registry class logic and remove duplicate code for the same functionality. 2021-06-24 11:30:11 +05:30
Akshay Joshi b372f08a59 Update copyright notices for 2021 2021-01-04 15:34:45 +05:30
Aditya Toshniwal 56cf64ad22 Fixed following SonarQube issues:
- Refactor functions to not always return the same value.
  - Rename "cls" to "self" or add the missing "self" parameter.
  - Remove useless assignment to variables.
2020-07-30 14:04:22 +05:30
Dave Page 85e89c869a Cleanup some code smells identified by SonarQube. 2020-06-10 16:42:59 +01:00
Khushboo Vashi f77aa3284f Added LDAP authentication support. Fixes #2186 2020-04-06 15:57:05 +05:30