doorcontrol: Treat members in "Misc. Access" folder as active for Access
All checks were successful
Ruff / ruff (push) Successful in 51s
Test / test (push) Successful in 6m4s

This commit is contained in:
Adam Goldsmith 2024-12-24 10:36:03 -05:00
parent d9ae263da0
commit 71d2227854

View File

@ -149,7 +149,12 @@ def sync_members(access_client: AccessClient):
if access_user := access_users_by_employee_number.get(member.uid): if access_user := access_users_by_employee_number.get(member.uid):
expected_user["status"] = ( expected_user["status"] = (
UserStatus.ACTIVE if member.is_active else UserStatus.DEACTIVATED UserStatus.ACTIVE
if (
member.is_active
or member.flags.filter(name="Misc. Access", type="folder").exists()
)
else UserStatus.DEACTIVATED
) )
changes = { changes = {
k: v for k, v in expected_user.items() if getattr(access_user, k) != v k: v for k, v in expected_user.items() if getattr(access_user, k) != v