Skip to content

Commit

Permalink
specified roles override controller level
Browse files Browse the repository at this point in the history
  • Loading branch information
SentryMan committed Dec 8, 2024
1 parent 4b06090 commit 082f3bd
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ public void buildApiDocumentation() {

public List<String> roles() {
final var roles = new ArrayList<>(methodRoles);
roles.addAll(bean.roles());
if (roles.isEmpty()) {
roles.addAll(bean.roles());
}
return roles;
}

Expand Down Expand Up @@ -521,7 +523,7 @@ private List<PathSegments.Segment> namedSegments() {

private boolean allArgParamNames() {
for (int i = 0; i < params.size(); i++) {
if (!params.get(i).name().equals("arg" + i)) {
if (!("arg" + i).equals(params.get(i).name())) {
return false;
}
}
Expand Down

0 comments on commit 082f3bd

Please sign in to comment.