Commit 58aa2b86 authored by Alex Wenckus's avatar Alex Wenckus Committed by alex

Fixed a few bugs with the command, we are running.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6409 b35dd754-fafc-0310-a699-88a17e54d16e
parent fee20c43
...@@ -11,9 +11,11 @@ package org.jivesoftware.wildfire.commands.admin; ...@@ -11,9 +11,11 @@ package org.jivesoftware.wildfire.commands.admin;
import org.jivesoftware.wildfire.commands.AdHocCommand; import org.jivesoftware.wildfire.commands.AdHocCommand;
import org.jivesoftware.wildfire.commands.SessionData; import org.jivesoftware.wildfire.commands.SessionData;
import org.jivesoftware.wildfire.HttpServerManager; import org.jivesoftware.wildfire.HttpServerManager;
import org.jivesoftware.wildfire.component.InternalComponentManager;
import org.dom4j.Element; import org.dom4j.Element;
import org.xmpp.forms.DataForm; import org.xmpp.forms.DataForm;
import org.xmpp.forms.FormField; import org.xmpp.forms.FormField;
import org.xmpp.packet.JID;
import java.util.List; import java.util.List;
import java.util.Collections; import java.util.Collections;
...@@ -51,7 +53,7 @@ public class HttpBindStatus extends AdHocCommand { ...@@ -51,7 +53,7 @@ public class HttpBindStatus extends AdHocCommand {
field = form.addField(); field = form.addField();
field.setLabel("Http Bind Enabled"); field.setLabel("Http Bind Enabled");
field.setVariable("httpbindenabled"); field.setVariable("httpbindenabled");
field.addValue(isEnabled); field.addValue(String.valueOf(isEnabled));
if(isEnabled) { if(isEnabled) {
field = form.addField(); field = form.addField();
...@@ -79,4 +81,11 @@ public class HttpBindStatus extends AdHocCommand { ...@@ -79,4 +81,11 @@ public class HttpBindStatus extends AdHocCommand {
protected Action getExecuteAction(SessionData data) { protected Action getExecuteAction(SessionData data) {
return null; return null;
} }
@Override
public boolean hasPermission(JID requester) {
return super.hasPermission(requester) ||
InternalComponentManager.getInstance().getComponent(requester) != null;
}
} }
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