Skip to content

Commit

Permalink
AuthMeta增加skipNoAuth参数
Browse files Browse the repository at this point in the history
  • Loading branch information
entropy-cloud committed Sep 24, 2024
1 parent 709efa3 commit 6350cc7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,10 @@ private GraphQLFieldDefinition buildActionField(String bizObjName, Object bean,

Auth auth = func.getAnnotation(Auth.class);
if (auth != null) {
field.setAuth(new ActionAuthMeta(auth.publicAccess(), ConvertHelper.toCsvSet(auth.roles()), MultiCsvSet.fromText(auth.permissions())));
field.setAuth(new ActionAuthMeta(auth.publicAccess(), ConvertHelper.toCsvSet(auth.roles()), MultiCsvSet.fromText(auth.permissions()),auth.skipWhenNoAuth()));
} else {
String permission = bizObjName + ':' + opType + "|" + bizObjName + ':' + name;
field.setAuth(new ActionAuthMeta(false, Collections.emptySet(), MultiCsvSet.fromText(permission)));
field.setAuth(new ActionAuthMeta(false, Collections.emptySet(), MultiCsvSet.fromText(permission),false));
}

BizMakerChecker makerChecker = func.getAnnotation(BizMakerChecker.class);
Expand Down

0 comments on commit 6350cc7

Please sign in to comment.