forked from ScoDoc/ScoDoc
Fix #631: cas_id numérique
This commit is contained in:
parent
598e037e38
commit
72dfcc086d
@ -30,7 +30,7 @@ def after_cas_login():
|
||||
flask.session.get("CAS_USERNAME"),
|
||||
)
|
||||
if cas_id is not None:
|
||||
user: User = User.query.filter_by(cas_id=cas_id).first()
|
||||
user: User = User.query.filter_by(cas_id=str(cas_id)).first()
|
||||
if user and user.active:
|
||||
if user.cas_allow_login:
|
||||
current_app.logger.info(f"CAS: login {user.user_name}")
|
||||
|
@ -351,7 +351,7 @@ def check_modif_user(
|
||||
|
||||
# Unicité du cas_id
|
||||
if cas_id:
|
||||
cas_users = User.query.filter_by(cas_id=cas_id).all()
|
||||
cas_users = User.query.filter_by(cas_id=str(cas_id)).all()
|
||||
if edit:
|
||||
if cas_users and (
|
||||
len(cas_users) > 1 or cas_users[0].user_name != user_name
|
||||
|
Loading…
Reference in New Issue
Block a user