* @throws RepositoryException
*/
@Override
protected UserManagerImpl createUserManager(SessionImpl session) throws RepositoryException {
UserManagerConfig umc = getConfig().getUserManagerConfig();
UserManagerImpl umgr;
// in contrast to the DefaultSecurityManager users are not retrieved
// from a dedicated workspace: the system session of each workspace must
// get a system user manager that asserts the existence of the admin user.
if (umc != null) {
Class<?>[] paramTypes = new Class[] {
SessionImpl.class,
String.class,
Properties.class,
MembershipCache.class};
umgr = (UserPerWorkspaceUserManager) umc.getUserManager(UserPerWorkspaceUserManager.class,
paramTypes, session, adminId, umc.getParameters(), getMembershipCache(session));
} else {
umgr = new UserPerWorkspaceUserManager(session, adminId, null, getMembershipCache(session));
}
if (umc != null && !(session instanceof SystemSession)) {
AuthorizableAction[] actions = umc.getAuthorizableActions();
umgr.setAuthorizableActions(actions);
}
return umgr;
}