package it.csi.demo.democomp.presentation.democomp.security;
import java.util.Map;
import it.csi.demo.democomp.business.*;

public class ActorBasedUISecConstraint extends AbstractUISecConstraint {

	private final String actorCode;

	public ActorBasedUISecConstraint(String nomeContainer, String nomeWidget,
			int constrainedBehavior, boolean defaultState, String actorCode) {
		super(nomeContainer, nomeWidget, constrainedBehavior, defaultState);
		this.actorCode = actorCode;
	}

	@Override
	public boolean specificCheck(Map session, SecurityHelper sh)
			throws BEException {
		return sh.verifyCurrentUserForActor(session, actorCode);
	}

}
