feat(settings): Allow a simpler overriding of the ldap URI

This commit is contained in:
Tom Hubrecht 2024-07-03 15:08:54 +02:00
parent f31ca3f45a
commit a2b2a38fe7
3 changed files with 4 additions and 3 deletions

1
.credentials/LDAP_URI Normal file
View file

@ -0,0 +1 @@
ldaps://ldap.spi.ens.fr:6636

View file

@ -169,7 +169,7 @@ LOGGING = {
CAS_AUTH_CLASS = "cas_server.auth.LdapAuthUser" CAS_AUTH_CLASS = "cas_server.auth.LdapAuthUser"
CAS_LDAP_SERVER = ldap3.Server( CAS_LDAP_SERVER = ldap3.Server(
"ldaps://ldap.spi.ens.fr:636", credentials.get("LDAP_URI", "ldaps://ldap.spi.ens.fr:636"),
get_info=ldap3.ALL, get_info=ldap3.ALL,
tls=ldap3.Tls( tls=ldap3.Tls(
validate=ssl.CERT_REQUIRED, validate=ssl.CERT_REQUIRED,

View file

@ -8,14 +8,14 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "loadcredential"; pname = "loadcredential";
version = "1.1"; version = "1.2";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Tom-Hubrecht"; owner = "Tom-Hubrecht";
repo = "loadcredential"; repo = "loadcredential";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-GXpMqGLDmDnTGa9cBYe0CP3Evm5sQ3AK9u6k3mLAW34="; hash = "sha256-rNWFD89h1p1jYWLcfzsa/w8nK3bR4aVJsUPx0UtZnIw=";
}; };
build-system = [ build-system = [