Group¶
- Portal module
- Group extension¶
- Group/Get¶
Gets groups by guid or gets the groups a user belongs to.
Authentication: - Logged in – You need to be logged in to use this feature
Optional authentication: - UserManager permission – Requires the System.UserManager permission if you get the group of another user
Parameters: - guid (optional) – GUID of the group you want to get
- userGuid (optional) – GUID of the user whose groups you want to get
Returns: A list of groups
If neither guid nor userGuid is given it returns the group of the user that is logged in. If guid is given then the group with the specific guid is returned. If userGuid is given, then the groups of the given user is returned.
- Group/Create¶
Creates a new group.
Authentication: - Logged in – You need to be logged in to use this feature
- CreateGroup permission – Requires the SystemPermissons.CreateGroup permission
Parameters: - name – The name of the new group
- systemPermission (integer) – the permissions of the new group (an integer from the SystemPermissons struct)
Returns: The created group
- Group/Delete¶
Deletes a group.
Authentication: - Logged in – You need to be logged in to use this feature
Parameters: guid – The GUID of the group that should be deleted
Returns: Number of affected rows in the database
- Group/Update¶
Updates a group.
Authentication: - Logged in – You need to be logged in to use this feature
Parameters: - guid – The GUID of the group that should be updated
- newName – The (new) name of the group
- newSystemPermission (integer, optional) – new permissions for the group (an integer from the SystemPermissons struct)
Returns: Number of affected rows in the database
- Group/AddUser¶
Adds a user to a group.
Authentication: - Logged in – You need to be logged in to use this feature
Optional authentication: - UserManager permission – May require the SystemPermissons.UserManager permission
Parameters: - guid – The GUID of the group that the user should be added to
- userGuid – The GUID of the user that should be added
- permissions (integer) – permissions for the new user (an integer from the SystemPermissons struct)
Returns: Number of affected rows in the database
If the user has UserManager permissions (SystemPermissons.UserManager) he will be able to add users to all groups. Otherwise he has to have the required permission for the specific group.
- Group/RemoveUser¶
Removes a user from a group.
Authentication: - Logged in – You need to be logged in to use this feature
Optional authentication: - UserManager permission – May require the SystemPermissons.UserManager permission
Parameters: - guid – The GUID of the group that the user should be removed from
- userGuid – The GUID of the user that should be removed
Returns: Number of affected rows in the database
If the user has UserManager permissions (SystemPermissons.UserManager) he will be able to remove users from all groups. Otherwise he has to have the required permission for the specific group.
- Group/UpdateUserPermissions¶
Adds a user to a group.
Authentication: - Logged in – You need to be logged in to use this feature
Optional authentication: - UserManager permission – May require the SystemPermissons.UserManager permission
Parameters: - guid – The GUID of the group to which the user’s permissions should be changed
- userGuid – The GUID of the user whose permissions should be altered
- permissions (integer) – the new permissions for the user (an integer from the SystemPermissons struct)
Returns: Number of affected rows in the database
If the user has UserManager permissions (SystemPermissons.UserManager) he will be able to change permissions for all users and all groups. Otherwise he has to have the required permission for the specific group.