Commit f6fe2632 authored by Axel Brand's avatar Axel Brand Committed by daeva

Gojara

- fix the error thrown by create user if Openfire runs with ldap / UserProvider that has no create permission. We dont actually need the user at all, we intercept the message before its processed ( don't know if it will be dropped after)

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13720 b35dd754-fafc-0310-a699-88a17e54d16e
parent e21b84b4
......@@ -130,7 +130,6 @@ public class RemoteRosterPlugin implements Plugin {
iManager.removeInterceptor(mainInterceptor);
PropertyEventDispatcher.removeListener(_settingsObserver);
compManager.removeListener(_componentObserver);
gojaraAdminManager.removeAdminUser();
pluginManager = null;
mainInterceptor = null;
compManager = null;
......
......@@ -8,9 +8,6 @@ import java.util.concurrent.ConcurrentHashMap;
import org.jivesoftware.openfire.PacketRouter;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.user.UserAlreadyExistsException;
import org.jivesoftware.openfire.user.UserManager;
import org.jivesoftware.openfire.user.UserNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xmpp.packet.JID;
......@@ -39,14 +36,10 @@ public class GojaraAdminManager {
private GojaraAdminManager() {
_server = XMPPServer.getInstance();
router = _server.getPacketRouter();
UserManager userManager = UserManager.getInstance();
try {
userManager.createUser("gojaraadmin", "iAmTheLawgiver", "gojaraadmin", null);
Log.info("gojaraAdmin User created.");
} catch (UserAlreadyExistsException e) {
Log.info("gojaraAdmin User already created.");
}
// we dont actually need to CREATE the user, it's sufficient to create the jid. The message gets intercepted before its processed.
adminUser = _server.createJID("gojaraadmin", null);
unconfiguredGateways = new HashSet<String>();
configuredGateways = new HashSet<String>();
gatewayStatisticsMap = new ConcurrentHashMap<String, Map<String, Integer>>(16, 0.75f, 1);
......@@ -58,16 +51,7 @@ public class GojaraAdminManager {
}
return myself;
}
public void removeAdminUser() {
UserManager userManager = UserManager.getInstance();
try {
userManager.deleteUser(userManager.getUser("gojaraadmin"));
} catch (UserNotFoundException e) {
Log.info("Couldn't remove adminUser.");
}
}
/**
* Sends a testmessage to specified gateway and schedules a task to check if there was a response.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment