This repository has been archived by the owner on Jul 21, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 51
/
conf.py
56 lines (42 loc) · 1.7 KB
/
conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# coding=utf-8
"""
django-permission application configure
"""
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from appconf import AppConf
from permission.handlers import LogicalPermissionHandler
__all__ = ('settings',)
class PermissionConf(AppConf):
DEFAULT_PERMISSION_HANDLER = 'permission.handlers.LogicalPermissionHandler'
"""Default permission handler class"""
CHECK_PERMISSION_PRESENCE = settings.DEBUG
"""Check if the specified string permission exists"""
REPLACE_BUILTIN_IF = True
"""Whether replace builtin if templatetag"""
DEFAULT_APL_FIELD_NAME = 'author'
DEFAULT_APL_ANY_PERMISSION = False
DEFAULT_APL_CHANGE_PERMISSION = True
DEFAULT_APL_DELETE_PERMISSION = True
DEFAULT_CPL_FIELD_NAME = 'collaborators'
DEFAULT_CPL_ANY_PERMISSION = False
DEFAULT_CPL_CHANGE_PERMISSION = True
DEFAULT_CPL_DELETE_PERMISSION = False
DEFAULT_GIPL_ANY_PERMISSION = False
DEFAULT_GIPL_ADD_PERMISSION = True
DEFAULT_GIPL_CHANGE_PERMISSION = True
DEFAULT_GIPL_DELETE_PERMISSION = False
DEFAULT_OSPL_ANY_PERMISSION = False
DEFAULT_OSPL_CHANGE_PERMISSION = True
DEFAULT_OSPL_DELETE_PERMISSION = True
DEFAULT_SPL_ANY_PERMISSION = False
DEFAULT_SPL_ADD_PERMISSION = True
DEFAULT_SPL_CHANGE_PERMISSION = True
DEFAULT_SPL_DELETE_PERMISSION = False
AUTODISCOVER_MODULE_NAME = 'perms'
AUTODISCOVER_VARIABLE_NAME = 'PERMISSION_LOGICS'
AUTODISCOVER_ENABLE = True
CHECK_AUTHENTICATION_BACKENDS = True
"""Check if AUTHENTICATION_BACKENDS is correctly configured"""
CHECK_TEMPLATES_OPTIONS_BUILTINS = True
"""Check if TEMPLATES[?]['OPTIONS']['builtins'] is correctly configured"""