mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 23:02:19 +00:00
Added ability to switch off Service API
This commit is contained in:
@@ -85,8 +85,10 @@ INSTALLED_APPS = (
|
|||||||
'sso',
|
'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"
|
LOGIN_REDIRECT_URL = "/profile"
|
||||||
|
|
||||||
### Jabber Service Settings
|
### Jabber Service Settings
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
|
import settings
|
||||||
|
|
||||||
def get_api(api):
|
def get_api(api):
|
||||||
|
|
||||||
|
if settings.DISABLE_SERVICES:
|
||||||
|
return BaseService()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
mod = __import__(api)
|
mod = __import__(api)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
Reference in New Issue
Block a user