Authorizer.checkRoles

Same as {@link #checkRoles(hunt.shiro.subject.PrincipalCollection, java.util.Collection) checkRoles(PrincipalCollection subjectPrincipal, Collection<string> roleIdentifiers)} but doesn't require a collection as an argument. Asserts the corresponding Subject/user has all of the specified roles by returning quietly if they do or throwing an {@link AuthorizationException} if they do not.

@param subjectPrincipal the application-specific subject/user identifier. @param roleIdentifiers the application-specific role identifiers to check (usually role ids or role names). @throws AuthorizationException if the user does not have all of the specified roles.

@since 1.1.0

  1. void checkRoles(PrincipalCollection subjectPrincipal, Collection!(string) roleIdentifiers)
  2. void checkRoles(PrincipalCollection subjectPrincipal, string[] roleIdentifiers)
    interface Authorizer

Meta