Skip to content

Commit

Permalink
Correct GQL Authorize policies
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss committed Sep 24, 2024
1 parent 0b87147 commit e14d998
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ private TgsGraphQLAuthorizeAttribute(IEnumerable<string> roleNames)
var listRoles = roleNames.ToList();
listRoles.Add(TgsAuthorizeAttribute.UserEnabledRole);
Roles = [.. listRoles];
Apply = ApplyPolicy.Validation;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public TgsGraphQLAuthorizeAttribute(string methodName)
?? throw new InvalidOperationException($"Could not find method {authorityType}.{methodName}() has no {nameof(TgsAuthorizeAttribute)}!");
MethodName = methodName;
Roles = authorizeAttribute.Roles?.Split(',', StringSplitOptions.RemoveEmptyEntries);
Apply = ApplyPolicy.Validation;
}
}
}

0 comments on commit e14d998

Please sign in to comment.