message: fix: checking if user has policies
diff: @@ -58,7 +58,7 @@ export class RoleGuard implements CanActivate {
  const hasPolicies = policies.length
  ? policies.some((policy) =>
  - user.role.policies.some((userPolicy) => userPolicy.name === policy),
  + user.role?.policies.some((userPolicy) => userPolicy.name === policy),
  )
  : true;
  