Merge main and common apps, extract authentication functionality to new authentication app. Closes issues #179 and #180
This commit is contained in:
24
mayan/apps/authentication/settings.py
Normal file
24
mayan/apps/authentication/settings.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from smart_settings.api import register_setting
|
||||
|
||||
register_setting(
|
||||
namespace='authentication',
|
||||
module='authentication.settings',
|
||||
name='LOGIN_METHOD',
|
||||
global_name='COMMON_LOGIN_METHOD',
|
||||
default='username',
|
||||
description=_('Controls the mechanism used to authenticated user. Options are: username, email'),
|
||||
)
|
||||
|
||||
register_setting(
|
||||
namespace='authentication',
|
||||
module='authentication.settings',
|
||||
name='ALLOW_ANONYMOUS_ACCESS',
|
||||
global_name='COMMON_ALLOW_ANONYMOUS_ACCESS',
|
||||
default=False,
|
||||
description=_('Allow non authenticated users, access to all views'),
|
||||
)
|
||||
Reference in New Issue
Block a user