export enum RoleEnum {
  SYS_ADMIN = 'SYS_ADMIN',
  PLATFORM_ADMIN = 'PLATFORM_ADMIN',
  TENANT_ADMIN = 'TENANT_ADMIN',
  CUSTOMER_USER = 'CUSTOMER_USER',
}

export function isAdmin(role: string) {
  if (role === RoleEnum.SYS_ADMIN || role === RoleEnum.PLATFORM_ADMIN) {
    return true;
  } else if (role === RoleEnum.TENANT_ADMIN || role === RoleEnum.CUSTOMER_USER) {
    return false;
  }
}
// 按钮级权限控制,只针对客户
export function authBtn(role: string): boolean {
  if (role === RoleEnum.CUSTOMER_USER) {
    return false;
  }
  return true;
}
