My intranet site uses LDAP and Active Directory to authenticate users. There are 2 kinds of Users: Managers and Employees. They are differentiated by having membership in a particular AD group.In an effort to improve my code I'm trying to use (hopefully appropriately) formal design patterns. I think perhaps a Finite State Machine might work here.  But I'm not sure which of the following models (or some other entirely) would be best:2 transitions with simple conditionsUnlogged --- auth==TRUE---> Employee ---group==TRUE---> Manager1 transition with a compound conditionUnlogged --- auth==TRUE && group==FALSE---> EmployeeUnlogged --- auth==TRUE && group==TRUE---> ManagerThe first feels cleaner. The second is closer to what should actually be happening. Am I on the right track? Would a different design pattern entirely be better?
Using a Finite State Machine for access management?
design patterns;finite state machine;access control