Adept is a browser-based system. As such it is inherently multi-user. With more than one operator, the need for user management becomes manifest. The
Adept Library provides this support with a
User object - a persistent
DAO.
The
User object contains a name and password for authentication. Authentication is not enough. Any system that needs user management needs a concept of authorisation. Who can access which form. Who can update which data. Adept provides this functionality with the concept of groups. The system holds persistent one list of group names in the object
User.Groups.
The
User.Groups object is quite literally and simply an array of string group names. The
User object keep an array of indexes to groups the user belongs to. Groups can be added but not deleted. Actually there is an exception. If a user is added and deleted immediately, their personal group is removed.
When a new user is created, a group of the same name is also created. They are automatically joined to the groups
Everybody and the one with their own name.
A newly created system will automatically create users and groups with the names
Everybody and
Administrator. It is a good idea to give both these users passwords as soon as practical.
How is it used? The system requires that someone be logged in at all times. It can be configured to ask or to default to
Everybody for an open interface. The log-in can be told to 'stick' so that the user need only log in once on a single system. The Adept user is for authorisation and convenience, not high security. Use the client operating system for that. For this reason there is no user time-out.
The
User object for the current user is attached to the session. The menu system, for example, limits display of selections by group names. Only users in the group
Administrator, for example, can open the page to add or administer users and groups. In a similar manner, tree nodes can be set to be hidden or unopenable for users not is a specific set of groups. Finally, edit components can be forced to hidden or read-only mode.
Lastly, all applications have a group. The list of available applications on the main desktop will only include those that the current user is in the group for. So, when creating an account for Sally, make sure that she is in the
Accounts group if she is to open the accounts system.
--
Posted By Paul Marrington to
Adept Open Source Library at 8/31/2007 11:59:00 AM