Skip to content
Snippets Groups Projects
Verified Commit 38dae130 authored by Tom Teichler's avatar Tom Teichler :beers: Committed by Jonathan Weth
Browse files

Add django-rules and django-guardian settings

parent 5412ef70
No related branches found
No related tags found
1 merge request!207Resolve "Roles and permissions"
......@@ -53,6 +53,8 @@ INSTALLED_APPS = [
"django.contrib.sites",
"django.contrib.staticfiles",
"django.contrib.humanize",
"guardian",
"rules.apps.AutodiscoverRulesConfig",
"polymorphic",
"django_global_request",
"settings_context_processor",
......@@ -558,3 +560,12 @@ LOGGING = {
'level': _settings.get("logging.level", "WARNING"),
},
}
# Rules and permissions
GUARDIAN_RAISE_403 = True
ANONYMOUS_USER_NAME = None
# Append authentication backends
AUTHENTICATION_BACKENDS.append("guardian.backends.ObjectPermissionBackend")
AUTHENTICATION_BACKENDS.append("rules.permissions.ObjectPermissionBackend")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment