setPermissionDescription()

The method sets the authorization description for the specified authorization level (bit).

Synopsis

public void setPermissionDescription(int permissionBit, const langString& description);

Parameter Description
permissionBit The permission bit for which the description is set.
description The description that is set for a bit.

Return Value

-

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

User administration

See also

setAllPermissionDescriptions()