privilegeLevelToPrivilegeStringInt function

String privilegeLevelToPrivilegeStringInt(
  1. int privilegeLevelInt,
  2. bool blocked
)

Implementation

String privilegeLevelToPrivilegeStringInt(int privilegeLevelInt, bool blocked) {
  if (blocked) {
    return "Blocked";
  } else {
    switch (privilegeLevelInt) {
      case 0:
        return 'No privilege';
      case 1:
        return 'Level 1 privilege';
      case 2:
        return 'Level 2 privilege';
      case 3:
        return 'Ownership privilege level';
    }
  }
  return "Unknwon privilege";
}