mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Added ability to switch off Service API
This commit is contained in:
@@ -85,8 +85,10 @@ INSTALLED_APPS = (
|
||||
'sso',
|
||||
)
|
||||
|
||||
AUTH_PROFILE_MODULE = 'sso.SSOUser'
|
||||
# Disable the service API, used for data imports
|
||||
DISABLE_SERVICES = False
|
||||
|
||||
AUTH_PROFILE_MODULE = 'sso.SSOUser'
|
||||
LOGIN_REDIRECT_URL = "/profile"
|
||||
|
||||
### Jabber Service Settings
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import settings
|
||||
|
||||
def get_api(api):
|
||||
|
||||
if settings.DISABLE_SERVICES:
|
||||
return BaseService()
|
||||
|
||||
try:
|
||||
mod = __import__(api)
|
||||
except ImportError:
|
||||
|
||||
Reference in New Issue
Block a user