public final static boolean isGranted(UserDetails userDetails, String permission) {
		Collection<GrantedPrivilege> privileges = userDetails.getAllPrivileges();
		if(privileges == null || privileges.size() < 1) {
			return false;
		}
		
		for(GrantedPrivilege privilege : privileges) {
			if(comparePrivilege(privilege, permission)) {
				return true;
			}
		}
		return false;
	}