Index: /main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl	(revision 25143)
+++ /main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl	(revision 25144)
@@ -27,5 +27,5 @@
 		
 		<!-- this right sidebar -->
-		<xsl:if test="$berryBasketOn or $documentBasketOn">
+		<xsl:if test="$berryBasketOn or ($documentBasketOn and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor)))">
 			<div id="rightSidebar">
 				<xsl:if test="$berryBasketOn">
Index: /main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl	(revision 25143)
+++ /main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl	(revision 25144)
@@ -100,5 +100,5 @@
 			
 			<div id="doc{@nodeID}" class="sectionContainer"><!-- *** -->
-				<xsl:if test="/page/pageRequest/paramList/param[@name = 'documentbasket']/@value = 'on'">
+				<xsl:if test="/page/pageRequest/paramList/param[@name = 'documentbasket']/@value = 'on' and /page/pageRequest/userInformation and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor))">
 					<table id="meta{@nodeID}">
 						<xsl:attribute name="style">
@@ -137,10 +137,7 @@
 	<!-- the page content -->
 	<xsl:template match="/page/pageResponse/document">
-		<xsl:if test="/page/pageRequest/paramList/param[@name = 'documentbasket']/@value = 'on'">
+		<xsl:if test="/page/pageRequest/paramList/param[@name = 'documentbasket']/@value = 'on' and /page/pageRequest/userInformation and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor))">
 			<script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts.js"><xsl:text> </xsl:text></script>
 			<script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts_util.js"><xsl:text> </xsl:text></script>
-		</xsl:if>
-		
-		<xsl:if test="/page/pageRequest/paramList/param[@name = 'documentbasket']/@value = 'on'">
 			<gsf:metadata name="all"/>
 		</xsl:if>
@@ -165,5 +162,5 @@
 			<xsl:call-template name="documentBerryForDocumentPage"/>
 			
-			<xsl:if test="/page/pageRequest/paramList/param[@name = 'documentbasket']/@value = 'on'">
+			<xsl:if test="/page/pageRequest/paramList/param[@name = 'documentbasket']/@value = 'on' and /page/pageRequest/userInformation and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor))">
 				<table style="width:100%"><tr>
 					<td id="editBarLeft" style="width:70%"><xsl:text> </xsl:text></td>
Index: /main/trunk/greenstone3/web/interfaces/oran/transform/pages/documentbasket.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/transform/pages/documentbasket.xsl	(revision 25143)
+++ /main/trunk/greenstone3/web/interfaces/oran/transform/pages/documentbasket.xsl	(revision 25144)
@@ -21,16 +21,19 @@
 	<!-- the page content -->
 	<xsl:template match="/page">
-		<script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts.js"><xsl:text> </xsl:text></script>
-		<script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts_dd.js"><xsl:text> </xsl:text></script>
-		<script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts_util.js"><xsl:text> </xsl:text></script>
-		<script type="text/javascript">YAHOO.util.Event.onDOMReady(initDocumentMaker);</script>
+		<!-- Make sure the user is allowed to use this functionality -->
+		<xsl:if test="/page/pageRequest/userInformation and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor))">
+			<script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts.js"><xsl:text> </xsl:text></script>
+			<script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts_dd.js"><xsl:text> </xsl:text></script>
+			<script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts_util.js"><xsl:text> </xsl:text></script>
+			<script type="text/javascript">YAHOO.util.Event.onDOMReady(initDocumentMaker);</script>
 
-		<link src="interfaces/{$interface_name}/style/documentbasket.js"/>
-		<xsl:for-each select="//item">
-			<a class="dbdoc">
-				<xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;dt=hierarchy&amp;d=<xsl:value-of select="@name"/>&amp;p.a=b&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;ed=1</xsl:attribute>
-				<xsl:value-of select="@title"/>
-			</a>
-		</xsl:for-each>
+			<link src="interfaces/{$interface_name}/style/documentbasket.js"/>
+			<xsl:for-each select="//item">
+				<a class="dbdoc">
+					<xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;dt=hierarchy&amp;d=<xsl:value-of select="@name"/>&amp;p.a=b&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;ed=1</xsl:attribute>
+					<xsl:value-of select="@title"/>
+				</a>
+			</xsl:for-each>
+		<xsl:if>
 	</xsl:template>
 
Index: /main/trunk/greenstone3/web/interfaces/oran/transform/pages/pref.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/transform/pages/pref.xsl	(revision 25143)
+++ /main/trunk/greenstone3/web/interfaces/oran/transform/pages/pref.xsl	(revision 25144)
@@ -180,15 +180,17 @@
 				
 				<!-- document maker -->
-				<div id="documentmakerprefs">
-					<xsl:variable name="documentbasket"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='documentbasket']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='documentbasket']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
-					<div class="paramLabel">Document basket</div>
-					<div class="paramValue">
-						<select name="documentbasket">
-							<option value="on"><xsl:if test="$documentbasket='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option> 
-							<option value="off"><xsl:if test="$documentbasket='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option>
-						</select>
-					</div>
-					<br class="clear"/>
-				</div>
+				<xsl:if test="/page/pageRequest/userInformation and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor))">
+					<div id="documentmakerprefs">
+						<xsl:variable name="documentbasket"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='documentbasket']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='documentbasket']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
+						<div class="paramLabel">Document basket</div>
+						<div class="paramValue">
+							<select name="documentbasket">
+								<option value="on"><xsl:if test="$documentbasket='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option> 
+								<option value="off"><xsl:if test="$documentbasket='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option>
+							</select>
+						</div>
+						<br class="clear"/>
+					</div>
+				</xsl:if>
 
 				<!-- tidy (?) -->
Index: /main/trunk/greenstone3/web/interfaces/oran/transform/util.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/transform/util.xsl	(revision 25143)
+++ /main/trunk/greenstone3/web/interfaces/oran/transform/util.xsl	(revision 25144)
@@ -29,4 +29,9 @@
   <xsl:variable name="berryBasketOn" select="/page/pageRequest/paramList/param[@name='berrybasket' and @value='on']"/>
   <xsl:variable name="documentBasketOn" select="/page/pageRequest/paramList/param[@name='documentbasket' and @value='on']"/>
+  
+	<xsl:variable name="thisCollectionEditor">
+		<xsl:value-of select="/page/pageRequest/paramList/param[@name = 'c']/@value"/>
+		<xsl:text>-collection-editor</xsl:text>
+	</xsl:variable>
   
   <!-- template to get the name of the current collection -->
@@ -543,5 +548,5 @@
 	<!-- put the drag&drop document basket on the page -->
 	<xsl:template name="documentBasket">
-		<xsl:if test="$documentBasketOn">
+		<xsl:if test="$documentBasketOn and /page/pageRequest/userInformation and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor))">
 			<div id="documentbasket" class="hide">
 				<span>Document Basket</span>
