Wrapping system users and groups as nodes

As well as supporting users and user groups maintained by modifying nodes, the user library provides features to represent and manage the underlying users and user groups through nodes. The difference between these and the Maintaining users and groups through nodes components is where the user or user group is mastered. The components in this section assume the underlying system users and user groups are definitive. These components are used for integrating user management into an application for users that may be shared with other applications.

Using system user nodes directly

The non-owning user group, user list, user selector and permission operations can use the underlying system user nodes (of type system.USER_TYPE). Default views used by these may not show sensible results with system user nodes (because they do not hold the status and other indicators), and for simplicity and consistently with users maintained through nodes It may be useful to represent the user as a wrapped user node.

Wrapping users

As well as using system user nodes directly, users can be wrapped.

Existing users can be wrapped using User.

Simple User Wrapper can be used to represent an existing user but only exposes the user logon reference of the user. It is useful for wrapping the anonymous user, which cannot be wrapped using User because of permission constraints.

Node Owner User is a variant of User that sets the user to the owner of the current node. This is useful because it can be included in an application to automatically represent the install user of the application. So if, for example, an application maintains a list of administrative users, this can be used to automatically insert the installer of the application as an administrator.

Wrapping user groups

User Group Wrapper represents an exising user group using the same fields as User Group.

By default, it does not list the users within the user group. The Create user list can be used to derive a User list from the user group.

  • If set to System, the User list list is set to the list of system users nodes within the user group.
  • If set to Wrapped, a wrapper node of type User is generated for each user and User list lists all of these.

If either of the Create user list options is set, the user list is updated whenever:

  • The user group node is derived.
  • The user group node is visited (i.e. on an extension script).
  • The user group node is executed.

If the Wrapped option is set and a user is removed from the user list, then if there are no original links to the wrapped user node, it is deleted. If there are references to the wrapped user node then these must be maintained for audit purposes. If the user has been deleted, the Status of the user wrapper is set to Deleted. If the user is valid but no longer in the user group, the status is set to Not in group.

Maintaining user groups

Role User Group Maintainer allows the membership of one or more user groups to be maintained. The user groups are represented as roles and real system users can be assigned to the user groups. This is useful for including users in an application but without the users being owned by the application.

The user groups must themselves be represented as wrapped user groups.

By default roles are exclusive. If there are two or more roles, setting a user to have one role removes them from the others. An option allows a user to be automatically added to roles later in the list so that, for example, if there are "admin" and "user" roles, then adding a user to the "admin" role will automatically add them to the "user" role too.