Accounts are created using an account template. This node defines information to show the user for account sign up, the type for the account package, and product list.
Executions of the account template are used to get details of the account template and to create an account.
Accounts are created under the ownership of an account authority. If they are to be offered to the public, they must be made publically readable and linkable (i.e. admin must grant these permissions).
The account template specifies:
- Accounts Package which describes where the account node should be created.
- Sign Up Header and Sign Up Footer to customise the sign up page.
- Type for account node which specifies the node type for the account node.
- Type For Account Package which specifies the node type to be used for the high-level package of the account.
- Theme which specifies the theme to be set on the account. If not set, theme will default based on the server name.
- Product List which lists products which should initially be installed in the account.
- Delegate Accounts Package and Type For Delegate Account which are used to create an additional "delegate account" as well as the main account. This is described in the subscription manager section below.
Account creation is carried out by the Create Account Script. In overview, this performs the following:
- Create a high-level package for the account.
- Create a node to represent the account, of type Account, in the accounts package.
- Create an account properties node inside the account node, and link the account to it. The account holder is granted update authority on this to set account-level properties such as the footer.
- If specified, create a delegate account and link the account to it.
- Create the primary user group, with reference account-users.
- Create the primary user, with reference account.
- Set user permissions, including permissions on the high level package.
- Install initial products. A product may replace the high-level package if it has the product descriptor accountPackage property set to true.