getPermissionDescription()
The method returns the authorization level description for the specified authorization bit.
Synopsis
public langString getPermissionDescription(int permissionBit);
Parameter | Description |
---|---|
permissionBit | The authorization bit for which the description is returned. |
Return Value
The authorization level description for the specified authorization bit.
Errors
Errors are shown in the log viewer.
EXAMPLE
main(mapping event)
{
shared_ptr<UserManagement> um = UserManagement::getInstance();
langString description = um.getPermissionDescription(2);
DebugN("Description level 2:", description);
/* Change description for bit 2 */
langString bit2;
for (int i = 0; i < getNoOfLangs(); i++)
setLangString(bit2, i, "bit2");
description = bit2;
/* save to object */
um.setPermissionDescription(2, description);
/* save to DP */
um.saveChanges();
DebugN("Description after changing the bit 2:", description);
}
Assignment
See also