The UserDetails interface declares a boolean isEnabled() method. The classes that implement it have ways of setting an instance enabled variable; the User class has constructors with an enabled argument, while the LdapUserDetailsImpl/Person/InetOrgPerson classes are constructed from their Essence static nested classes and those have setEnabled(boolean) methods.
However, I'm not sure what the best way of supporting enabling and disabling sers (or locking and unlocking them). The LdapUserDetailsImpl class and its children have a nice collection of supporting classes; however, these default to ignoring enabled and locked. I guess I would have to define a custom mapper extending an associated mapper's class to call InetOrgPerson.Essence.setEnabled(boolean) appropriately. Where would this get its data? I probably would create an auxiliary object class with attributes enabled and locked. That is a bother.
How do the other readers of this forum handle enabling and locking, and what is the practical difference between disabling and locking anyway? I might just use the approach in one of the security blogs and use vote-based authorization, together with a JMX-enabled voter that holds the distinguished names of disabled users.



