setGroupPermission()
The method sets the group authorization of a user group.
Synopsis
public void setGroupPermission(bit32 b32);
Parameter | Description |
---|---|
bit32 | The group authorization that is set. |
Return Value
-
Errors
Errors are shown in the log viewer.
EXAMPLE
#uses "classes/userManagement/UserManagement"
main(mapping event)
{
shared_ptr<UserManagement> userMgm = UserManagement::getInstance();
shared_ptr<UserManagementGroup> GroupData;
bit32 b32 = 11111;
dyn_anytype allGroups = userMgm.getAllGroups();
for (int i =1; i<=dynlen(allGroups); i++)
{
GroupData = userMgm.getGroup(allGroups[i].getId());
}
if ( GroupData.getName()=="WinCCOATest")
{
/* Sets the group permission for the group "WinCCOATest" */
GroupData.setGroupPermission(b32);
}
GroupData= userMgm.getGroupByName("WinCCOATest");
DebugN("Group:", GroupData.getName(),GroupData.getId() );
DebugN("Permission:", GroupData.getPermissionSet());
}
Assignment
See also