// Path: src/main/java/com/asolutions/scmsshd/sshd/IProjectAuthorizer.java
// public interface IProjectAuthorizer {
// 
// 	AuthorizationLevel userIsAuthorizedForProject(String username, String project) throws UnparsableProjectException;
// 
// }
// 
// Path: src/main/java/com/asolutions/scmsshd/sshd/UnparsableProjectException.java
// public class UnparsableProjectException extends Exception {
// 
// 	private static final long serialVersionUID = 643951700141491862L;
// 
// 	public UnparsableProjectException(String reason) {
// 		super(reason);
// 	}
// 
// }


import java.util.ArrayList;
import com.asolutions.scmsshd.sshd.IProjectAuthorizer;
import com.asolutions.scmsshd.sshd.UnparsableProjectException;
package com.asolutions.scmsshd.authorizors;



public class PassIfAnyInCollectionPassAuthorizor implements IProjectAuthorizer {

	private ArrayList<IProjectAuthorizer> authList = new ArrayList<IProjectAuthorizer>();

	public AuthorizationLevel userIsAuthorizedForProject(String username, String project)
			throws UnparsableProjectException {
		for (IProjectAuthorizer auth : authList) {
			AuthorizationLevel result = auth.userIsAuthorizedForProject(username, project);
			if (result != null){
				return result;
			}
		}
		return null;
	}

	public void setProjectAuthorizers(ArrayList<IProjectAuthorizer> authList) {
// Path: src/main/java/com/asolutions/scmsshd/sshd/IProjectAuthorizer.java
// public interface IProjectAuthorizer {
// 
// 	AuthorizationLevel userIsAuthorizedForProject(String username, String project) throws UnparsableProjectException;
// 
// }
// 
// Path: src/main/java/com/asolutions/scmsshd/sshd/UnparsableProjectException.java
// public class UnparsableProjectException extends Exception {
// 
// 	private static final long serialVersionUID = 643951700141491862L;
// 
// 	public UnparsableProjectException(String reason) {
// 		super(reason);
// 	}
// 
// }


// Path: src/main/java/com/asolutions/scmsshd/authorizors/PassIfAnyInCollectionPassAuthorizor.java
import java.util.ArrayList;
import com.asolutions.scmsshd.sshd.IProjectAuthorizer;
import com.asolutions.scmsshd.sshd.UnparsableProjectException;

package com.asolutions.scmsshd.authorizors;



public class PassIfAnyInCollectionPassAuthorizor implements IProjectAuthorizer {

	private ArrayList<IProjectAuthorizer> authList = new ArrayList<IProjectAuthorizer>();

	public AuthorizationLevel userIsAuthorizedForProject(String username, String project)
			throws UnparsableProjectException {
		for (IProjectAuthorizer auth : authList) {
			AuthorizationLevel result = auth.userIsAuthorizedForProject(username, project);
			if (result != null){
				return result;
			}
		}
		return null;
	}

	public void setProjectAuthorizers(ArrayList<IProjectAuthorizer> authList) {
		this.authList = authList;