Skip to content

Commit

Permalink
feat: Add method for checking if annotation based security is used (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur- authored Mar 27, 2024
1 parent 499a1a1 commit 3ab7cc4
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -401,4 +401,14 @@ private static Logger getLogger() {
return LoggerFactory.getLogger(NavigationAccessControl.class);
}

/**
* Checks if an access checker of the given type is in use.
*
* @return {@code true} if a checker is in use, {@code false} otherwise
*/
public boolean hasAccessChecker(
Class<? extends NavigationAccessChecker> type) {
return checkerList.stream()
.anyMatch(checker -> type.isAssignableFrom(checker.getClass()));
}
}

0 comments on commit 3ab7cc4

Please sign in to comment.