
package de.ivu.elect.business.security.control;

import javax.enterprise.context.SessionScoped;
import javax.inject.Inject;
import javax.inject.Named;

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.business.security.entity.ElectPricipalContext;
import de.ivu.elect.jee.security.AbstractPrincipal;

@SessionScoped
@Named(AbstractPrincipal.COMPONENT_NAME)
public class ElectCommonPrincipal extends AbstractElectCommonPrincipal implements ElectPrincipalMarker {

  private static final long serialVersionUID = 1L;

  @Inject
  private transient ExtendedElectPricipalContext extendedElectPricipalContext;

  public ElectCommonPrincipal() {
    super();
  }

  @Override // Methode für Mockito-Tests relevant
  public boolean hasUseCasePermission(UseCasePermission useCasePermission) {
    return super.hasUseCasePermission(useCasePermission);
  }

  @Override
  public ElectPricipalContext getPrincipalContext() {
    return extendedElectPricipalContext;
  }
}
