User Groups
- optional
A Template Package can include user groups to be created during deployment by configuring user group definitions in the manifest.userGroups array.
A user group definition should include the _name, _description, and _shortName for each group like so:
// manifest.json"userGroups": [ { "_name": "Sample User Group", "_shortName": "sample-group", "_description": "A sample user group" }]You may include as many user group definitions in the userGroups array as needed.
User Group Permissions#
User groups usually require permissions to be associated with them to give the member users access to Twinit. Currently the manifest does not support defining user group permissions, though it is in the roadmap for a future release.
The safest way to create user group permissions, and the way that would give you the most control, is to use a custom setup script as explained in Extending the Template Package.
However, When user groups are created, they are usually done so using the IafProj.addUserGroups method. This method allows for including permissions on the group definition. So you could assign permissions to the user groups like below.
// manifest.json// Admin group with full permissions"userGroups": [ { "_name": "Sample User Group", "_shortName": "sample-group", "_description": "A sample user group with full Admin permissions", "permissions": { "accessAll": true } }]// manifest.json// User group with READ and EDIT NamedUserItem permissions{ "_name": "visitors", "_shortName": "visitors", "_description": "Visitor Users", "permissions": { "namedUserItems":[ { "actions": ["READ", "EDIT"] } ] }}Deploying User Groups#
When the Template Package is deployed, if the defined user group does not exist it will be created. If a user group with the same _name already exists, it will be skipped.