Re: [dspace-tech] Re: Hiding communities/collections from unauthenticated users.

2019-02-17 Thread Paul Münch
Thank you Shaun and Terry. This are really helpful hints.

Kind regards,

Paul Münch

Am 15.02.19 um 19:40 schrieb Terry Brady:
> In XMLUI, I have suppressed the display of a specific collection from
> all users.
>
>  match="dri:referenceSet/dri:reference[contains(@url,'123456789/11')]"
> mode="community-browser"/>
>
> An easy way to detect authentication in XMLUI is to set the following
> global variable.
>
>  select="/dri:document/dri:meta/dri:userMeta/@authenticated"/>
>
> Perhaps these checks could be combined.
>
>  match="dri:referenceSet/dri:reference[contains(@url,'123456789/11')
> and $AUTH]" mode="community-browser"/>
>
> Terry
>
>
> On Fri, Feb 15, 2019 at 8:14 AM Shaun donovan  > wrote:
>
> Hi all.
>
> Please note that this is done on DSpace 5.8 using Mirage.
>
> This is the JQuery code:
>
> (function ($) {
>     $(document).ready(function(){
>     if($("a[href$='/login']").size() != 0){
>    
> 
> $('#aspect_artifactbrowser_CommunityBrowser_div_comunity-browser').find('li').each(function(){
>     var name =
> $(this).find("span").text();
>     if((name.match("^Africa
> Collection")) || (name.match("^Cartography")) ||
> (name.match("^Publications")) || (name.match("^HSRC Archive")) ){
>     $(this).hide();
>     }
>     });
>     }
>     });
> })(jq190);
>
> I save this in the skins lib/js directory as abcd.js and then load
> it in the skin's sitemap.xmap:
>
>   
>      value="lib/css/media.css"/>
>      value="lib/js/jquery-ui-1.8.15.custom.min.js"/>
>      value="{global:theme-path}"/>
>     http://theme.name>" value="{global:theme-path}"/>
>     * value="lib/js/abcd.js"/>*
>     
>     
>
> and then in lib/xsl/core/pagestructure.xsl
>
>          http://ajax.googleapis.com/ajax/libs/jquery/>', $jqueryVersion
> ,'/jquery.min.js')}"> 
>  
>     var jq190 = jQuery.noConflict();
>     var $ = jQuery.noConflict();
>  
>
> It's a pretty manual process but it works. It looks for a "/login"
> href to determine whether the user is logged in or not, and hides
> the communities if they are not. In this case, I am hiding
> communities "Africa Collection", "Cartography", "Publications" and
> "HSRC Archive".
>
> I hope this helps, but give me a shout if you struggle.
>
> Kind Regards.
>
> Shaun
>
> On 2019/02/13 08:11, Paul Münch wrote:
>> Hello Shaun,
>>
>> it is possible for you to share a code template here or in a
>> public git repository?
>>
>> Many thanks and kind regards,
>>
>> Paul Münch
>>
>> Am 12.02.19 um 12:19 schrieb Shaun donovan:
>>>
>>> Hi Diego.
>>>
>>> I have done this with JQuery. It is a simple solution and it
>>> works. Let me know if you would like to try it and I will send
>>> you the code.
>>>
>>> Kind Regards.
>>>
>>> Shaun.
>>>
>>> On 2019/02/12 09:00, Antti Laurila wrote:
 Hi!

 I'll respond on behalf Ilja, we were working on the same
 project. And the answer is unfortunately no, we did not find a
 solution to this.

 BR,
 Antti

 On Friday, January 25, 2019 at 4:02:31 PM UTC+2, Diego Brice
 wrote:

 IIja, did you finally manage to do this? How?.

 El miércoles, 14 de septiembre de 2016, 9:40:08 (UTC-3),
 Ilja Sidoroff escribió:

 I'm trying to hide some internal communities and
 collections from unauthenticated users (with DSpace
 5.5/XMLUI, but also with upcoming 6.0). How-to in the
 Wiki has been outdated
 
 (https://wiki.duraspace.org/display/DSPACE/Hide+Community+or+Collection+from+list)
 and some other googling turned out advise to filter
 specific communities/collections in xsl, which I think
 is prone to breakage in migrations and such (e.g.
 
 http://stackoverflow.com/questions/37122851/hiding-collections-and-sub-collections-in-dspace).


 What I'd like to do is to filter the
 community/collection list when it is generated. This
 seems such common requirement, that it might have been
 implemented already by someone?

 br,

 Ilja Sidoroff
 University of Eastern Finland

 -- 
 All messages to this mailing list should adhere to the
 

Re: [dspace-tech] Re: Hiding communities/collections from unauthenticated users.

2019-02-15 Thread Terry Brady
In XMLUI, I have suppressed the display of a specific collection from all
users.



An easy way to detect authentication in XMLUI is to set the following
global variable.



Perhaps these checks could be combined.



Terry


On Fri, Feb 15, 2019 at 8:14 AM Shaun donovan  wrote:

> Hi all.
>
> Please note that this is done on DSpace 5.8 using Mirage.
>
> This is the JQuery code:
>
> (function ($) {
> $(document).ready(function(){
> if($("a[href$='/login']").size() != 0){
>
> $('#aspect_artifactbrowser_CommunityBrowser_div_comunity-browser').find('li').each(function(){
> var name = $(this).find("span").text();
> if((name.match("^Africa Collection")) ||
> (name.match("^Cartography")) || (name.match("^Publications")) ||
> (name.match("^HSRC Archive")) ){
> $(this).hide();
> }
> });
> }
> });
> })(jq190);
>
> I save this in the skins lib/js directory as abcd.js and then load it in
> the skin's sitemap.xmap:
>
>   
>  value="lib/css/media.css"/>
>  value="lib/js/jquery-ui-1.8.15.custom.min.js"/>
>  value="{global:theme-path}"/>
>  value="{global:theme-path}"/>
> * value="lib/js/abcd.js"/>*
> 
> 
>
> and then in lib/xsl/core/pagestructure.xsl
>
>   
>  
> var jq190 = jQuery.noConflict();
> var $ = jQuery.noConflict();
>  
>
> It's a pretty manual process but it works. It looks for a "/login" href to
> determine whether the user is logged in or not, and hides the communities
> if they are not. In this case, I am hiding communities "Africa Collection",
> "Cartography", "Publications" and "HSRC Archive".
>
> I hope this helps, but give me a shout if you struggle.
>
> Kind Regards.
>
> Shaun
> On 2019/02/13 08:11, Paul Münch wrote:
>
> Hello Shaun,
>
> it is possible for you to share a code template here or in a public git
> repository?
>
> Many thanks and kind regards,
>
> Paul Münch
>
> Am 12.02.19 um 12:19 schrieb Shaun donovan:
>
> Hi Diego.
>
> I have done this with JQuery. It is a simple solution and it works. Let me
> know if you would like to try it and I will send you the code.
>
> Kind Regards.
>
> Shaun.
> On 2019/02/12 09:00, Antti Laurila wrote:
>
> Hi!
>
> I'll respond on behalf Ilja, we were working on the same project. And the
> answer is unfortunately no, we did not find a solution to this.
>
> BR,
> Antti
>
> On Friday, January 25, 2019 at 4:02:31 PM UTC+2, Diego Brice wrote:
>>
>> IIja, did you finally manage to do this? How?.
>>
>> El miércoles, 14 de septiembre de 2016, 9:40:08 (UTC-3), Ilja Sidoroff
>> escribió:
>>>
>>> I'm trying to hide some internal communities and collections from
>>> unauthenticated users (with DSpace 5.5/XMLUI, but also with upcoming 6.0).
>>> How-to in the Wiki has been outdated (
>>> https://wiki.duraspace.org/display/DSPACE/Hide+Community+or+Collection+from+list)
>>> and some other googling turned out advise to filter specific
>>> communities/collections in xsl, which I think is prone to breakage in
>>> migrations and such (e.g.
>>> http://stackoverflow.com/questions/37122851/hiding-collections-and-sub-collections-in-dspace).
>>>
>>>
>>> What I'd like to do is to filter the community/collection list when it
>>> is generated. This seems such common requirement, that it might have been
>>> implemented already by someone?
>>>
>>> br,
>>>
>>> Ilja Sidoroff
>>> University of Eastern Finland
>>>
>> --
> All messages to this mailing list should adhere to the DuraSpace Code of
> Conduct: https://duraspace.org/about/policies/code-of-conduct/
> ---
> You received this message because you are subscribed to the Google Groups
> "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dspace-tech+unsubscr...@googlegroups.com.
> To post to this group, send email to dspace-tech@googlegroups.com.
> Visit this group at https://groups.google.com/group/dspace-tech.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> All messages to this mailing list should adhere to the DuraSpace Code of
> Conduct: https://duraspace.org/about/policies/code-of-conduct/
> ---
> You received this message because you are subscribed to the Google Groups
> "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dspace-tech+unsubscr...@googlegroups.com.
> To post to this group, send email to dspace-tech@googlegroups.com.
> Visit this group at https://groups.google.com/group/dspace-tech.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Philipps-Universität Marburg | UB
> Digitale Dienste | Deutschhausstraße 9 | D018
> Tel. +49 06421 28-24624
> --
>
> --
> 

Re: [dspace-tech] Re: Hiding communities/collections from unauthenticated users.

2019-02-15 Thread Shaun donovan

Hi all.

Please note that this is done on DSpace 5.8 using Mirage.

This is the JQuery code:

(function ($) {
    $(document).ready(function(){
    if($("a[href$='/login']").size() != 0){
$('#aspect_artifactbrowser_CommunityBrowser_div_comunity-browser').find('li').each(function(){
    var name = $(this).find("span").text();
    if((name.match("^Africa Collection")) 
|| (name.match("^Cartography")) || (name.match("^Publications")) || 
(name.match("^HSRC Archive")) ){

    $(this).hide();
    }
    });
    }
    });
})(jq190);

I save this in the skins lib/js directory as abcd.js and then load it in 
the skin's sitemap.xmap:


  
    value="lib/css/media.css"/>
    value="lib/js/jquery-ui-1.8.15.custom.min.js"/>
    value="{global:theme-path}"/>
    value="{global:theme-path}"/>

**
    
    

and then in lib/xsl/core/pagestructure.xsl

          

 
    var jq190 = jQuery.noConflict();
    var $ = jQuery.noConflict();
 

It's a pretty manual process but it works. It looks for a "/login" href 
to determine whether the user is logged in or not, and hides the 
communities if they are not. In this case, I am hiding communities 
"Africa Collection", "Cartography", "Publications" and "HSRC Archive".


I hope this helps, but give me a shout if you struggle.

Kind Regards.

Shaun

On 2019/02/13 08:11, Paul Münch wrote:

Hello Shaun,

it is possible for you to share a code template here or in a public 
git repository?


Many thanks and kind regards,

Paul Münch

Am 12.02.19 um 12:19 schrieb Shaun donovan:


Hi Diego.

I have done this with JQuery. It is a simple solution and it works. 
Let me know if you would like to try it and I will send you the code.


Kind Regards.

Shaun.

On 2019/02/12 09:00, Antti Laurila wrote:

Hi!

I'll respond on behalf Ilja, we were working on the same project. 
And the answer is unfortunately no, we did not find a solution to this.


BR,
Antti

On Friday, January 25, 2019 at 4:02:31 PM UTC+2, Diego Brice wrote:

IIja, did you finally manage to do this? How?.

El miércoles, 14 de septiembre de 2016, 9:40:08 (UTC-3), Ilja
Sidoroff escribió:

I'm trying to hide some internal communities and collections
from unauthenticated users (with DSpace 5.5/XMLUI, but also
with upcoming 6.0). How-to in the Wiki has been outdated

(https://wiki.duraspace.org/display/DSPACE/Hide+Community+or+Collection+from+list

)
and some other googling turned out advise to filter specific
communities/collections in xsl, which I think is prone to
breakage in migrations and such (e.g.

http://stackoverflow.com/questions/37122851/hiding-collections-and-sub-collections-in-dspace

).


What I'd like to do is to filter the community/collection
list when it is generated. This seems such common
requirement, that it might have been implemented already by
someone?

br,

Ilja Sidoroff
University of Eastern Finland

--
All messages to this mailing list should adhere to the DuraSpace 
Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/

---
You received this message because you are subscribed to the Google 
Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, 
send an email to dspace-tech+unsubscr...@googlegroups.com 
.
To post to this group, send email to dspace-tech@googlegroups.com 
.

Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

--
All messages to this mailing list should adhere to the DuraSpace Code 
of Conduct: https://duraspace.org/about/policies/code-of-conduct/

---
You received this message because you are subscribed to the Google 
Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, 
send an email to dspace-tech+unsubscr...@googlegroups.com 
.
To post to this group, send email to dspace-tech@googlegroups.com 
.

Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


--
Philipps-Universität Marburg | UB
Digitale Dienste | Deutschhausstraße 9 | D018
Tel. +49 06421 28-24624
--
--
All messages to this mailing list should adhere to the DuraSpace Code 
of 

Re: [dspace-tech] Re: Hiding communities/collections from unauthenticated users.

2019-02-12 Thread Paul Münch
Hello Shaun,

it is possible for you to share a code template here or in a public git
repository?

Many thanks and kind regards,

Paul Münch

Am 12.02.19 um 12:19 schrieb Shaun donovan:
>
> Hi Diego.
>
> I have done this with JQuery. It is a simple solution and it works.
> Let me know if you would like to try it and I will send you the code.
>
> Kind Regards.
>
> Shaun.
>
> On 2019/02/12 09:00, Antti Laurila wrote:
>> Hi!
>>
>> I'll respond on behalf Ilja, we were working on the same project. And
>> the answer is unfortunately no, we did not find a solution to this.
>>
>> BR,
>> Antti
>>
>> On Friday, January 25, 2019 at 4:02:31 PM UTC+2, Diego Brice wrote:
>>
>> IIja, did you finally manage to do this? How?.
>>
>> El miércoles, 14 de septiembre de 2016, 9:40:08 (UTC-3), Ilja
>> Sidoroff escribió:
>>
>> I'm trying to hide some internal communities and collections
>> from unauthenticated users (with DSpace 5.5/XMLUI, but also
>> with upcoming 6.0). How-to in the Wiki has been outdated
>> 
>> (https://wiki.duraspace.org/display/DSPACE/Hide+Community+or+Collection+from+list
>> 
>> )
>> and some other googling turned out advise to filter specific
>> communities/collections in xsl, which I think is prone to
>> breakage in migrations and such (e.g.
>> 
>> http://stackoverflow.com/questions/37122851/hiding-collections-and-sub-collections-in-dspace
>> 
>> ).
>>
>>
>> What I'd like to do is to filter the community/collection
>> list when it is generated. This seems such common
>> requirement, that it might have been implemented already by
>> someone?
>>
>> br,
>>
>> Ilja Sidoroff
>> University of Eastern Finland
>>
>> -- 
>> All messages to this mailing list should adhere to the DuraSpace Code
>> of Conduct: https://duraspace.org/about/policies/code-of-conduct/
>> ---
>> You received this message because you are subscribed to the Google
>> Groups "DSpace Technical Support" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to dspace-tech+unsubscr...@googlegroups.com
>> .
>> To post to this group, send email to dspace-tech@googlegroups.com
>> .
>> Visit this group at https://groups.google.com/group/dspace-tech.
>> For more options, visit https://groups.google.com/d/optout.
> -- 
> All messages to this mailing list should adhere to the DuraSpace Code
> of Conduct: https://duraspace.org/about/policies/code-of-conduct/
> ---
> You received this message because you are subscribed to the Google
> Groups "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to dspace-tech+unsubscr...@googlegroups.com
> .
> To post to this group, send email to dspace-tech@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/dspace-tech.
> For more options, visit https://groups.google.com/d/optout.

-- 
Philipps-Universität Marburg | UB 
Digitale Dienste | Deutschhausstraße 9 | D018
Tel. +49 06421 28-24624  
--

-- 
All messages to this mailing list should adhere to the DuraSpace Code of 
Conduct: https://duraspace.org/about/policies/code-of-conduct/
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: [dspace-tech] Re: Hiding communities/collections from unauthenticated users.

2019-02-12 Thread Shaun donovan

Hi Diego.

I have done this with JQuery. It is a simple solution and it works. Let 
me know if you would like to try it and I will send you the code.


Kind Regards.

Shaun.

On 2019/02/12 09:00, Antti Laurila wrote:

Hi!

I'll respond on behalf Ilja, we were working on the same project. And 
the answer is unfortunately no, we did not find a solution to this.


BR,
Antti

On Friday, January 25, 2019 at 4:02:31 PM UTC+2, Diego Brice wrote:

IIja, did you finally manage to do this? How?.

El miércoles, 14 de septiembre de 2016, 9:40:08 (UTC-3), Ilja
Sidoroff escribió:

I'm trying to hide some internal communities and collections
from unauthenticated users (with DSpace 5.5/XMLUI, but also
with upcoming 6.0). How-to in the Wiki has been outdated

(https://wiki.duraspace.org/display/DSPACE/Hide+Community+or+Collection+from+list

)
and some other googling turned out advise to filter specific
communities/collections in xsl, which I think is prone to
breakage in migrations and such (e.g.

http://stackoverflow.com/questions/37122851/hiding-collections-and-sub-collections-in-dspace

).


What I'd like to do is to filter the community/collection list
when it is generated. This seems such common requirement, that
it might have been implemented already by someone?

br,

Ilja Sidoroff
University of Eastern Finland

--
All messages to this mailing list should adhere to the DuraSpace Code 
of Conduct: https://duraspace.org/about/policies/code-of-conduct/

---
You received this message because you are subscribed to the Google 
Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to dspace-tech+unsubscr...@googlegroups.com 
.
To post to this group, send email to dspace-tech@googlegroups.com 
.

Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


--
All messages to this mailing list should adhere to the DuraSpace Code of 
Conduct: https://duraspace.org/about/policies/code-of-conduct/
--- 
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] Re: Hiding communities/collections from unauthenticated users.

2019-01-25 Thread Diego Brice
IIja, did you finally manage to do this? How?.

El miércoles, 14 de septiembre de 2016, 9:40:08 (UTC-3), Ilja Sidoroff 
escribió:
>
> I'm trying to hide some internal communities and collections from 
> unauthenticated users (with DSpace 5.5/XMLUI, but also with upcoming 6.0). 
> How-to in the Wiki has been outdated (
> https://wiki.duraspace.org/display/DSPACE/Hide+Community+or+Collection+from+list)
>  
> and some other googling turned out advise to filter specific 
> communities/collections in xsl, which I think is prone to breakage in 
> migrations and such (e.g. 
> http://stackoverflow.com/questions/37122851/hiding-collections-and-sub-collections-in-dspace).
>  
>
>
> What I'd like to do is to filter the community/collection list when it is 
> generated. This seems such common requirement, that it might have been 
> implemented already by someone? 
>
> br, 
>
> Ilja Sidoroff 
> University of Eastern Finland 
>

-- 
All messages to this mailing list should adhere to the DuraSpace Code of 
Conduct: https://duraspace.org/about/policies/code-of-conduct/
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] Re: Hiding communities/collections from unauthenticated users.

2018-02-23 Thread Diego Spano
IIja, did you finally manage to do this? How?.

Thanks.

El miércoles, 14 de septiembre de 2016, 9:40:08 (UTC-3), Ilja Sidoroff 
escribió:
>
> I'm trying to hide some internal communities and collections from 
> unauthenticated users (with DSpace 5.5/XMLUI, but also with upcoming 6.0). 
> How-to in the Wiki has been outdated (
> https://wiki.duraspace.org/display/DSPACE/Hide+Community+or+Collection+from+list)
>  
> and some other googling turned out advise to filter specific 
> communities/collections in xsl, which I think is prone to breakage in 
> migrations and such (e.g. 
> http://stackoverflow.com/questions/37122851/hiding-collections-and-sub-collections-in-dspace).
>  
>
>
> What I'd like to do is to filter the community/collection list when it is 
> generated. This seems such common requirement, that it might have been 
> implemented already by someone? 
>
> br, 
>
> Ilja Sidoroff 
> University of Eastern Finland 
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.