Commit 7791cadf authored by Gabriel Guardincerri's avatar Gabriel Guardincerri Committed by gguardin

Components can create users

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/branches@10045 b35dd754-fafc-0310-a699-88a17e54d16e
parent f2b12194
......@@ -8,19 +8,20 @@
*/
package org.jivesoftware.openfire.commands.admin.user;
import org.dom4j.Element;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.commands.AdHocCommand;
import org.jivesoftware.openfire.commands.SessionData;
import org.jivesoftware.openfire.user.UserManager;
import org.jivesoftware.openfire.component.InternalComponentManager;
import org.jivesoftware.openfire.user.UserAlreadyExistsException;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.user.UserManager;
import org.jivesoftware.util.StringUtils;
import org.dom4j.Element;
import org.xmpp.forms.DataForm;
import org.xmpp.forms.FormField;
import org.xmpp.packet.JID;
import java.util.List;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
......@@ -168,6 +169,7 @@ public class AddUser extends AdHocCommand {
}
public boolean hasPermission(JID requester) {
return super.hasPermission(requester) && !UserManager.getUserProvider().isReadOnly();
return (super.hasPermission(requester) || InternalComponentManager.getInstance().hasComponent(requester))
&& !UserManager.getUserProvider().isReadOnly();
}
}
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