Skip to content

Commit

Permalink
perf: fix Role permission's getter
Browse files Browse the repository at this point in the history
  • Loading branch information
lichong-a committed Aug 8, 2024
1 parent 1d5a876 commit 5a826da
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ public void setRoleKey(String roleKey) {
}
}

public String getRoleKey() {
if (roleKey.toUpperCase().startsWith("ROLE_")) {
return roleKey.toUpperCase();
}
return "ROLE_" + roleKey.toUpperCase();
}

@Override
public String getAuthority() {
return this.roleKey;
Expand Down

0 comments on commit 5a826da

Please sign in to comment.