doorcontrol: Treat members in "Misc. Access" folder as active for Access
This commit is contained in:
parent
d9ae263da0
commit
71d2227854
@ -149,7 +149,12 @@ def sync_members(access_client: AccessClient):
|
||||
|
||||
if access_user := access_users_by_employee_number.get(member.uid):
|
||||
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 = {
|
||||
k: v for k, v in expected_user.items() if getattr(access_user, k) != v
|
||||
|
Loading…
Reference in New Issue
Block a user