[Building Sakai] Sakai CLE 2.9.3: gatewaySiteListDisplayCount not working

Steve Swinsburg steve.swinsburg at gmail.com
Fri Nov 22 12:16:56 PST 2013


This property is specifically for logged out users. It's possible to configure multiple sites that a user can see when logged out, ie gateway sites. What you have done is overridden the preferences tool settings that allow a user to configure this and mixed the logged in and logged out settings together. If that's what you are after then ok, but I would probably replace the else{} logic with a new property that defines what you want otherwise future code maintenance might be tricky.

Cheers
Steve

Sent from my iPad

> On 23 Nov 2013, at 2:38, "Wilson, Kimberly" <wilsonk at mail.amc.edu> wrote:
> 
> Hi Steve:
>  
> Since I saw this in sakai.properties (line 87), I thought that was where to set it:
>  
> # Tab display.  The number of tabs to display before adding the "More" dropdown list.
> # Default=4
> #gatewaySiteListDisplayCount=4
>  
> I think I figured out how to make it work, I’ve tested a lot, but not really sure if this will break something else, what do you think?:
>  
> In this file, I changed the code from this:
> (starting on line 110):
> if (!loggedIn)
> {
>             tabsToDisplay = serverConfigurationService.getInt(
>                         "gatewaySiteListDisplayCount", tabsToDisplay);
> }
> else
> {
>             Preferences prefs = preferencesService
>                                     .getPreferences(session.getUserId());
>             ResourceProperties props = prefs.getProperties("sakai:portal:sitenav");
>             try
>             {
>                         tabsToDisplay = (int) props.getLongProperty("tabs");
>             }
>             catch (Exception any)
>             {
>             }
> }
>  
> To this (I removed the else clause):
>  
> if (loggedIn)
> {
>             tabsToDisplay = serverConfigurationService.getInt(
>                         "gatewaySiteListDisplayCount", tabsToDisplay);
> }
>  
>  
> Kim Wilson, MSCIS | Systems Analyst – IS Academic Systems | Albany Medical Center | 518-264-1055
>  
> <image002.jpg>
>  
> From: Steve Swinsburg [mailto:steve.swinsburg at gmail.com] 
> Sent: Friday, November 22, 2013 5:51 AM
> To: Wilson, Kimberly
> Cc: sakai-dev
> Subject: Re: [Building Sakai] Sakai CLE 2.9.3: gatewaySiteListDisplayCount not working
>  
> Hi Kim
> 
> What are you trying to achieve here? That property is for something else (the number of gateway sites) but it sounds like you want to limit the number of site tabs once a user is logged in?
> 
> Cheers
> Steve
> 
> sent from mobile device
> 
> On 22/11/2013 8:17 AM, "Wilson, Kimberly" <wilsonk at mail.amc.edu> wrote:
> We are implementing a neo skin in Sakai CLE 2.9.3
>  
> We have discovered the gatewaySiteListDisplayCount in sakai.properties is not working.
>  
> We want to limit our users from adding too many site tabs
>  
> I have searched through the Jira and Confluence sites and the closest issue I found is this, but it appears out of date.
>  
> Does anyone know if there is a fix or patch available to make this work?
>  
> Sakai Workgroup problems: gatewaySiteListDisplayCount & site title display
> https://jira.sakaiproject.org/browse/SAK-10938
>  
> and maybe this is relevant: 
>  
> Sakai default config is missing a huge number of config options
> https://jira.sakaiproject.org/browse/SAK-21124
>  
> I also found these issue that other users apparently submitted to this email list in July:
>  
> http://sakai-project-mail-list-archives.1343168.n2.nabble.com/gatewaySiteListDisplayCount-Problem-td7590557.html
>  
> http://sakai-project-mail-list-archives.1343168.n2.nabble.com/Building-Sakai-My-Worksite-translation-location-td7591052.html
>  
> Thanks!
>  
> Kim Wilson, MSCIS | Systems Analyst – IS Academic Systems | Albany Medical Center | 518-264-1055
>  
> <image004.jpg>
>  
> ----------------------------------------- CONFIDENTIALITY NOTICE: This email and any attachments may contain confidential information that is protected by law and is for the sole use of the individuals or entities to which it is addressed. If you are not the intended recipient, please notify the sender by replying to this email and destroying all copies of the communication and attachments. Further use, disclosure, copying, distribution of, or reliance upon the contents of this email and attachments is strictly prohibited. To contact Albany Medical Center, or for a copy of our privacy practices, please visit us on the Internet at www.amc.edu.
> 
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
> ----------------------------------------- CONFIDENTIALITY NOTICE: This email and any attachments may contain confidential information that is protected by law and is for the sole use of the individuals or entities to which it is addressed. If you are not the intended recipient, please notify the sender by replying to this email and destroying all copies of the communication and attachments. Further use, disclosure, copying, distribution of, or reliance upon the contents of this email and attachments is strictly prohibited. To contact Albany Medical Center, or for a copy of our privacy practices, please visit us on the Internet at www.amc.edu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20131123/8ba47e73/attachment.html 


More information about the sakai-dev mailing list