use of com.sun.enterprise.config.serverbeans.JaccProvider in project Payara by payara.
the class CreateJACCProvider method preAuthorization.
@Override
public boolean preAuthorization(AdminCommandContext context) {
config = CLIUtil.chooseConfig(domain, target, context.getActionReport());
if (config == null) {
return false;
}
securityService = config.getSecurityService();
JaccProvider jaccProvider = CLIUtil.findJaccProvider(securityService, jaccProviderName);
if (jaccProvider != null) {
final ActionReport report = context.getActionReport();
report.setMessage(localStrings.getLocalString("create.jacc.provider.duplicatefound", "JaccProvider named {0} exists. Cannot add duplicate JaccProvider.", jaccProviderName));
report.setActionExitCode(ActionReport.ExitCode.FAILURE);
return false;
}
return true;
}
Aggregations