Skip to content

Commit

Permalink
Overriden toString implementation in AuthorizationRequest for log pur…
Browse files Browse the repository at this point in the history
…poses
  • Loading branch information
litvinovg committed Oct 26, 2023
1 parent a06d2f0 commit ad33d4f
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,18 @@ public static AuthorizationRequest or(AuthorizationRequest fist, AuthorizationRe
public AuthorizationRequest and(AuthorizationRequest second) {
return new AndAuthorizationRequest(this, second);
}

@Override
public String toString() {
String result = "";
if (!getRoleUris().isEmpty()) {
result += String.format("User with roles '%s' ", getRoleUris().toString());
}
if (!getEditorUris().isEmpty()) {
result += String.format(" profile uris '%s' ", getEditorUris().toString());
}
result += String.format(" requested '%s' ", getAccessOperation());
result += String.format(" on '%s' ", getAccessObject());
return result;
}
}

0 comments on commit ad33d4f

Please sign in to comment.