Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
protokollsystem
proto3
Commits
94007c20
Commit
94007c20
authored
Mar 27, 2018
by
Robin Sonnabend
Browse files
Rename python-auth -> common-web submodule
parent
f63ce916
Changes
4
Hide whitespace changes
Inline
Side-by-side
.gitmodules
View file @
94007c20
[submodule "auth"]
path =
auth
url = git@git.fsmpi.rwth-aachen.de:protokollsystem/
python-auth
.git
path =
common
url = git@git.fsmpi.rwth-aachen.de:protokollsystem/
common-web
.git
common
@
f9dbd00f
File moved
config.py.example
View file @
94007c20
...
...
@@ -73,7 +73,7 @@ SESSION_PROTECTION = "strong" # do not change
# authentication
SECURITY_KEY = "some other random string" # change this
AUTH_MAX_DURATION = 300
from
auth
.auth import LdapManager, ADManager, StaticUserManager
from
common
.auth import LdapManager, ADManager, StaticUserManager
AUTH_BACKENDS = [
LdapManager(
host="ldap.example.com",
...
...
shared.py
View file @
94007c20
...
...
@@ -124,7 +124,7 @@ def code_filter(text):
return
"<code>{}</code>"
.
format
(
text
)
from
auth
.auth
import
UserManager
,
SecurityManager
,
User
from
common
.auth
import
UserManager
,
SecurityManager
,
User
max_duration
=
getattr
(
config
,
"AUTH_MAX_DURATION"
)
user_manager
=
UserManager
(
backends
=
config
.
AUTH_BACKENDS
)
security_manager
=
SecurityManager
(
config
.
SECURITY_KEY
,
max_duration
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment