intToPL method

PrivilegeLevel intToPL(
  1. int level
)

Implementation

PrivilegeLevel intToPL(int level) {
  switch (level) {
    case 0:
      return PrivilegeLevel.noPrivilege;
    case 1:
      return PrivilegeLevel.level1Privilege;
    case 2:
      return PrivilegeLevel.level2Privilege;
    case 3:
      return PrivilegeLevel.ownerPrivilege;
  }
  return PrivilegeLevel.noPrivilege;
}