use of org.apache.wicket.authroles.authentication.AuthenticatedWebApplication in project midpoint by Evolveum.
the class WebComponentUtil method isAuthorized.
public static boolean isAuthorized(Collection<String> actions) {
if (actions == null || actions.isEmpty()) {
return true;
}
Roles roles = new Roles(AuthorizationConstants.AUTZ_ALL_URL);
roles.add(AuthorizationConstants.AUTZ_GUI_ALL_URL);
roles.addAll(actions);
return ((AuthenticatedWebApplication) AuthenticatedWebApplication.get()).hasAnyRole(roles);
}
Aggregations