setAllPermissionDescriptions()
The method sets all authorization descriptions for the authorization levels (bits).
Synopsis
public void setAllPermissionDescriptions(const dyn_langString& descriptions);
Parameter | Description |
---|---|
description | The authorization descriptions that are set. |
Errors
Errors are shown in the log viewer.
EXAMPLE
main(mapping event)
{
shared_ptr<UserManagement> um = UserManagement::getInstance();
dyn_langString descriptions = um.getAllPermissionDescriptions();
DebugN("All desrciptions:", descriptions);
/* Change the description for bit 1 */
langString bit1;
for (int i = 0; i < getNoOfLangs(); i++)
setLangString(bit1, i, "bit1");
descriptions[1] = bit1;
/* Save to object */
um.setAllPermissionDescriptions(descriptions);
/* Save to DP */
um.saveChanges();
DebugN("All descriptions after changing the bit 1:", descriptions);
}
Assignment
See also