Although I'm not using discovery, I do have a DSpace instance where we have
"limited" documents where I made (some pretty extensive) modifications to
restrict search and browse results based on one's DSpace-defined access.
Example: If user ONLY has access to Collection A's documents, if they do a
search, they will ONLY get results back from Collection A.
I also made modifications so that a user can click a link in the nav bar and
see a list of ONLY the communities and collections they have READ access to.
The main menu shows a list of ALL communities and collections so users will
know what's in the repository, in case they want to request access, but if they
click on one of the collections they don't have access to, they'll get an error
message indicating they don't have access and will have to request access
through our access control application.
Unfortunately, it would be very difficult for me to list all of the changes I
made and it's an old DSpace version (1.5.2) we're getting ready to upgrade so
I'm sure the code is going to change.
Cheers,
Sue
Sue Walker-Thornton
(w): (757) 864-2368
(m): (757) 506-9903
From: Matthew Drover [mailto:[email protected]]
Sent: Thursday, April 11, 2013 8:06 PM
To: [email protected]
Cc: [email protected]
Subject: Re: [Dspace-tech] hide communities/collecitons from discovery search
Yes, I'm using Mirage. On a side note, is it possible to exclude results form a
public user so they do not see items they have no access to. I was thinking of
editing the indexing method to not index them, but I'm hoping there is another
way.
Any ideas.
-Matthew
On 2013-04-11 10:56 AM, "helix84"
<[email protected]<mailto:[email protected]>> wrote:
xmlui is an interface, not theme. I'll assume you're using the default Mirage
interface.
The generic solution (works regardless of theme used) is to comment out the
following "if" block and rebuild DSpace:
https://github.com/DSpace/DSpace/blob/dspace-3.1/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/discovery/AbstractSearch.java#L375
The specific solution for dri2xhtml-alt based templates (including Mirage) is
to change this template:
https://github.com/DSpace/DSpace/blob/dspace-3.1/dspace-xmlui/src/main/webapp/themes/dri2xhtml-alt/aspect/artifactbrowser/discovery.xsl#L38
to
<xsl:template match="dri:list/dri:list" mode="dsoList" priority="7">
<xsl:if test="@id !=
'aspect.discovery.SimpleSearch.list.comm-coll-result-list'">
<xsl:apply-templates select="dri:head"/>
<ul>
<xsl:apply-templates select="*[not(name()='head')]" mode="dsoList"/>
</ul>
</xsl:if>
</xsl:template>
In this case you have to modify that exact file in the dri2xhtml-alt,
overriding the template in your derived theme doesn't work for some reason I
didn't figure out (if you do that, you'll notice the formatting of item list
below is broken).
Regards,
~~helix84
Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette