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

import javax.ejb.Stateless;
import javax.enterprise.inject.Specializes;
import javax.inject.Inject;

import de.ivu.elect.business.mandant.entity.Mandant;
import de.ivu.elect.business.security.control.NlAdminRolleVorhanden;

/*
ELECTVAPP-102
 */
@Stateless
@Specializes
public class NlCoreRolleCreator extends RolleCreator {

  @Inject
  private transient NlAdminRolleVorhanden nlAdminRolleVorhanden;

  @Override
  protected boolean isAnwenderRolleMitMinimalenRechtenAnlegen(Mandant mandant) {
    return false;
  }

  @Override
  protected boolean isAdminRolleMitAllenRechtenAnlegen(Mandant mandant) {
    return nlAdminRolleVorhanden.isAdminRolleVorhanden(mandant);
  }

  @Override
  protected boolean isNeueRechteLoggen() {
    return false; // nicht interessant, da Anwendung immer neu installiert wird
  }
}
