On Oct 1, 2009, at 1:02 PM, asiri (SVN) wrote:
Author: asiri
Date: 2009-10-01 13:02:54 +0200 (Thu, 01 Oct 2009)
New Revision: 24165
Modified:
platform/xwiki-applications/trunk/officeimporter/src/main/
resources/XWiki/OfficeImporterAdmin.xml
Log:
XAOFFICE-23: Add UI support for restricting openoffice server
manipulations to main xwiki.
* Implemented.
Modified: platform/xwiki-applications/trunk/officeimporter/src/main/
resources/XWiki/OfficeImporterAdmin.xml
===================================================================
--- platform/xwiki-applications/trunk/officeimporter/src/main/
resources/XWiki/OfficeImporterAdmin.xml 2009-10-01 11:02:17 UTC (rev
24164)
+++ platform/xwiki-applications/trunk/officeimporter/src/main/
resources/XWiki/OfficeImporterAdmin.xml 2009-10-01 11:02:54 UTC (rev
24165)
@@ -88,7 +88,10 @@
#set($serverType=$msgServerTypeExternalRemote)
#end
-#if($hasAdmin)
+#set($isMainXWiki=($context.database == "xwiki"))
+#set($enableControls=($hasAdmin && $isMainXWiki))
Again something bad.... (same reason).
Thanks
-Vincent
+
+#if($enableControls)
<form action="$xwiki.requestURL"
enctype="multipart/form-data"
method="post">
#end
{table}
@@ -101,11 +104,11 @@
<p>$msgServerProfile</p>|<p>
$ooconfig.profilePath</p>
#end
<p>$msgServerState</p>|<p>
$oomanager.serverState</p>
-#if($hasAdmin)
+#if($enableControls)
<p>$msgActions</p>|<p><input
name="action"
type="radio" value="start" checked="checked"/>
$actionStart<br/
><input name="action" type="radio"
value="stop"/>
$actionStop<br/>#if($actionRestart)<input name="action"
type="radio" value="restart"/>
$actionRestart<br/>#end</
p>
#end
{table}
-#if($hasAdmin)
+#if($enableControls)
<p><input type="submit"
value="$msgUpdate"/></p>
</form>
#end