mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 20:40:17 +02:00
14 lines
474 B
Python
14 lines
474 B
Python
from __future__ import unicode_literals
|
|
from django.core.checks import Error
|
|
from django.conf import settings
|
|
|
|
|
|
def check_login_scopes_setting(*args, **kwargs):
|
|
errors = []
|
|
try:
|
|
assert settings.LOGIN_TOKEN_SCOPES
|
|
except (AssertionError, AttributeError):
|
|
errors.append(Error('LOGIN_TOKEN_SCOPES setting cannot be blank.',
|
|
hint='SSO tokens used for logging in must require scopes to be refreshable.'))
|
|
return errors
|