message: chore(origin-backend-core): simplified getRolesFromRights
diff: @@ -39,21 +39,10 @@ export function getRolesFromRights(rights: number): Role[] {
  return [];
  }
  - const userRoles: Role[] = [];
  -
  const rolesKeys = Object.keys(Role);
  const roles: Role[] = rolesKeys.splice(0, rolesKeys.length / 2).map((value) => Number(value));
  - for (const role of roles.sort((a, b) => b - a)) {
  - if (userRights < role) {
  - continue;
  - }
  -
  - userRoles.push(role);
  - userRights -= role;
  - }
  -
  - return userRoles;
  + return roles.filter(role => rights&role);
  }
  export function isRole(user: { rights: number }, ...roles: Role[]): boolean {
  