Add active check
This commit is contained in:
@@ -103,6 +103,8 @@ def checkAccess(key: str, db: Session):
|
||||
card = db.exec(select(Card).where(Card.key == key)).one()
|
||||
for auth in card.group.accessauths:
|
||||
logger.info(f"checking auth: {auth.name}")
|
||||
if not auth.is_active:
|
||||
return False
|
||||
if auth.type == "timetable":
|
||||
for timetable in auth.timetables:
|
||||
logger.info(f" checking timetable {timetable.id}")
|
||||
|
||||
Reference in New Issue
Block a user