repo.markWorkspaceActive(wspName);
}
Properties[] moduleConfig = new AuthContextProvider("", ((RepositoryImpl) getRepository()).getConfig().getSecurityConfig().getLoginModuleConfig()).getModuleConfig();
PrincipalProvider defaultPP = new DefaultPrincipalProvider(systemSession, (UserManagerImpl) getUserManager(systemSession));
boolean initialized = false;
for (Properties props : moduleConfig) {
//GRANITE-4470: apply config to DefaultPrincipalProvider if there is no explicit PrincipalProvider configured
if (!props.containsKey(LoginModuleConfig.PARAM_PRINCIPAL_PROVIDER_CLASS) && props.containsKey(AbstractPrincipalProvider.MAXSIZE_KEY)) {
defaultPP.init(props);
initialized = true;
break;
}
}
if (!initialized) {
defaultPP.init(new Properties());
}
p = new WorkspaceBasedPrincipalProviderRegistry(defaultPP);
ppRegistries.put(wspName, p);
}