agave-files/files-api/src/main/java/org/iplantc/service/io/resources/AbstractServerResource.java
/**
     * Indicates if the given list of {@link Role} matches the list of allowed
     * and denied roles.
     * 
     * @param allowedRoles
     *            The list of allowed roles.
     * @param deniedRoles
     *            The list of denied roles.
     * @param userRoles
     *            The list of roles to check.
     * @return True if the list of roles match allowed and denied roles.
     */
Indicates if the given list of  Role matches the list of allowed
and denied roles.

@param allowedRoles
The list of allowed roles.
@param deniedRoles
The list of denied roles.
@param userRoles
The list of roles to check.
@return True if the list of roles match allowed and denied roles.
Indicates if the given list of Role matches the list of allowed and denied roles . @param allowedRoles The list of allowed roles . @param deniedRoles The list of denied roles . @param userRoles The list of roles to check . @return True if the list of roles match allowed and denied roles .
private boolean checkGroups(String[] allowedGroups, String[] deniedGroups, List<Role> userRoles) {
        boolean allowed = false;
		for (int i = 0; !allowed && i < allowedGroups.length; i++) {
		    allowed = "anyone".equals(allowedGroups[i]) || hasRole(userRoles, allowedGroups[i]);
        }
        for (int i = 0; allowed && i < deniedGroups.length; i++) {
            allowed = !("anyone".equals(deniedGroups[i]) || hasRole(userRoles, deniedGroups[i]));
        }
        return allowed;
    }
private boolean checkGroups ( String [ ] allowedGroups , String [ ] deniedGroups , List < Role > userRoles ) { boolean allowed = false ; for ( int i = 0 ; ! allowed && i < allowedGroups . length ; i ++ ) { allowed = "anyone" . equals ( allowedGroups [ i ] ) || hasRole ( userRoles , allowedGroups [ i ] ) ; } for ( int i = 0 ; allowed && i < deniedGroups . length ; i ++ ) { allowed = ! ( "anyone" . equals ( deniedGroups [ i ] ) || hasRole ( userRoles , deniedGroups [ i ] ) ) ; } return allowed ; }
Indicates if the given list of {@link Role} matches the list of allowed
 and denied roles.
Indicates if the given list of { @link Role } matches the list of allowed and denied roles .