CAS: si activé et forcé et cas_id renseigné et cas_allow_login, on ne peut pas se logguer (ajout condition cas_allow_login)

This commit is contained in:
Emmanuel Viennet 2024-11-12 15:40:36 +01:00
parent 50d2c91a54
commit f5d070d071
2 changed files with 6 additions and 2 deletions

View File

@ -222,7 +222,11 @@ class User(UserMixin, ScoDocModel):
) )
return False return False
# si CAS activé et forcé et cas_id renseigné, on ne peut pas se logguer # si CAS activé et forcé et cas_id renseigné, on ne peut pas se logguer
if self.cas_id and ScoDocSiteConfig.get("cas_force"): if (
self.cas_id
and self.cas_allow_login
and ScoDocSiteConfig.get("cas_force")
):
log( log(
f"""auth: login attempt for user {self.user_name f"""auth: login attempt for user {self.user_name
} (cas_id='{ } (cas_id='{

View File

@ -3,7 +3,7 @@
"Infos sur version ScoDoc" "Infos sur version ScoDoc"
SCOVERSION = "9.7.42" SCOVERSION = "9.7.43"
SCONAME = "ScoDoc" SCONAME = "ScoDoc"