privilegeLevelIntToMemberRoleString function

String privilegeLevelIntToMemberRoleString(
  1. int privilegeLevelInt,
  2. bool? blocked
)

Implementation

String privilegeLevelIntToMemberRoleString(
    int privilegeLevelInt, bool? blocked) {
  if ((blocked != null) && (blocked)) {
    return "Blocked member";
  } else {
    switch (privilegeLevelInt) {
      case 0:
        return 'Unprivileged member';
      case 1:
        return 'Member with level 1 privileges';
      case 2:
        return 'Member with level 2 privileges';
      case 3:
        return 'Member with ownership privileges';
    }
  }
  return "Member with unknwon privilege";
}