@Override
	public int vote(Authentication authentication, FilterInvocation filter, Collection<ConfigAttribute> attributes) {
		if ("anonymousUser".equals(authentication.getPrincipal())) {
			return ACCESS_DENIED;
		}
		if (!(authentication.getPrincipal() instanceof SecuredUser)) {
			return ACCESS_DENIED;
		}
		SecuredUser secureUser = cast(authentication.getPrincipal());
		User loginUser = secureUser.getUser();
		if (loginUser.getRole() == Role.ADMIN) {
			return ACCESS_GRANTED;
		}

		String realm = StringUtils.split(filter.getHttpRequest().getPathInfo(), '/')[0];
		if (secureUser.getUsername().equals(realm)) {
			return ACCESS_GRANTED;
		} else {
			User user = userService.getOneWithEagerFetch(loginUser.getUserId());
			List<User> owners = user.getOwners();
			for (User each : owners) {
				if (realm.equals(each.getUserId())) {
					return ACCESS_GRANTED;
				}
			}
		}
		return ACCESS_DENIED;
	}
User Switch Recognized Voter for SVN.

@since 3.2
ngrinder-controller/src/main/java/org/ngrinder/security/UserSwitchPermissionVoter.java