* @throws RepositoryException If an error occurs.
*/
private static void createSystemUsers(UserManager userManager,
String adminId,
String anonymousId) throws RepositoryException {
Principal pr = new PrincipalImpl(SecurityConstants.ADMINISTRATORS_NAME);
Group admins = (Group) userManager.getAuthorizable(pr);
if (admins == null) {
admins = userManager.createGroup(new PrincipalImpl(SecurityConstants.ADMINISTRATORS_NAME));
log.debug("...created administrators group with name '"+SecurityConstants.ADMINISTRATORS_NAME+"'");
}
if (adminId != null) {
Authorizable admin = userManager.getAuthorizable(adminId);