diff --git a/.gitmodules b/.gitmodules index 7239078ed277ceb71c6a632050926ea87da5e500..87aa32e6b518e6567d76c90a4664d57d5d8997f4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [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 diff --git a/auth b/common similarity index 100% rename from auth rename to common diff --git a/config.py.example b/config.py.example index a199e84a496a4b08307be26ffbe1fc9d67425c0c..19e0343dcef817fd7e69cfdc4b225a168ee4659b 100644 --- a/config.py.example +++ b/config.py.example @@ -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", diff --git a/shared.py b/shared.py index 50ee7159d8f7b6059dee855f9d6e0c42bac0d23c..450aa05bf08e9ec1c270db5aa8226a39f12c7638 100644 --- a/shared.py +++ b/shared.py @@ -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)