mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4/root@4975 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4/root@4979 .
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5033 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -63,6 +63,9 @@
|
|||||||
<!-- This value should be one of 'myalfresco', 'userhome', 'companyhome' or 'guesthome' -->
|
<!-- This value should be one of 'myalfresco', 'userhome', 'companyhome' or 'guesthome' -->
|
||||||
<initial-location>myalfresco</initial-location>
|
<initial-location>myalfresco</initial-location>
|
||||||
|
|
||||||
|
<!-- set true allow the Guest user to configure the start location preferences - false by default -->
|
||||||
|
<allow-guest-config>false</allow-guest-config>
|
||||||
|
|
||||||
<!-- the URL to the client Help file -->
|
<!-- the URL to the client Help file -->
|
||||||
<help-url>http://www.alfresco.org/help/webclient</help-url>
|
<help-url>http://www.alfresco.org/help/webclient</help-url>
|
||||||
|
|
||||||
|
@@ -239,4 +239,12 @@ public class UserPreferencesBean
|
|||||||
|
|
||||||
return locations.toArray(new SelectItem[locations.size()]);
|
return locations.toArray(new SelectItem[locations.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if the Guest user is allowed to configure the user preferences
|
||||||
|
*/
|
||||||
|
public boolean getAllowGuestConfig()
|
||||||
|
{
|
||||||
|
return Application.getClientConfig(FacesContext.getCurrentInstance()).getAllowGuestConfig();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -59,6 +59,7 @@ public class ClientConfigElement extends ConfigElementAdapter
|
|||||||
private ExpiringValueCache<String> wcmDomain = new ExpiringValueCache(1000*10L);
|
private ExpiringValueCache<String> wcmDomain = new ExpiringValueCache(1000*10L);
|
||||||
private ExpiringValueCache<String> wcmPort = new ExpiringValueCache(1000*10L);
|
private ExpiringValueCache<String> wcmPort = new ExpiringValueCache(1000*10L);
|
||||||
private String defaultHomeSpacePath = "/app:company_home";
|
private String defaultHomeSpacePath = "/app:company_home";
|
||||||
|
private boolean allowGuestConfig = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default Constructor
|
* Default Constructor
|
||||||
@@ -180,6 +181,11 @@ public class ClientConfigElement extends ConfigElementAdapter
|
|||||||
combinedElement.setInitialLocation(newElement.getInitialLocation());
|
combinedElement.setInitialLocation(newElement.getInitialLocation());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newElement.getAllowGuestConfig() != combinedElement.getAllowGuestConfig())
|
||||||
|
{
|
||||||
|
combinedElement.setAllowGuestConfig(newElement.getAllowGuestConfig());
|
||||||
|
}
|
||||||
|
|
||||||
return combinedElement;
|
return combinedElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -480,4 +486,14 @@ public class ClientConfigElement extends ConfigElementAdapter
|
|||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*package*/ void setAllowGuestConfig(boolean allow)
|
||||||
|
{
|
||||||
|
this.allowGuestConfig = allow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getAllowGuestConfig()
|
||||||
|
{
|
||||||
|
return this.allowGuestConfig;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -43,6 +43,7 @@ public class ClientElementReader implements ConfigElementReader
|
|||||||
public static final String ELEMENT_AJAX_ENABLED = "ajax-enabled";
|
public static final String ELEMENT_AJAX_ENABLED = "ajax-enabled";
|
||||||
public static final String ELEMENT_INITIALLOCATION = "initial-location";
|
public static final String ELEMENT_INITIALLOCATION = "initial-location";
|
||||||
public static final String ELEMENT_DEFAULTHOMESPACEPATH = "default-home-space-path";
|
public static final String ELEMENT_DEFAULTHOMESPACEPATH = "default-home-space-path";
|
||||||
|
public static final String ELEMENT_GUESTCONFIG = "allow-guest-config";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.config.xml.elementreader.ConfigElementReader#parse(org.dom4j.Element)
|
* @see org.alfresco.config.xml.elementreader.ConfigElementReader#parse(org.dom4j.Element)
|
||||||
@@ -169,6 +170,14 @@ public class ClientElementReader implements ConfigElementReader
|
|||||||
{
|
{
|
||||||
configElement.setDefaultHomeSpacePath(defaultHomeSpacePath.getTextTrim());
|
configElement.setDefaultHomeSpacePath(defaultHomeSpacePath.getTextTrim());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get allow Guest to configure start location preferences
|
||||||
|
Element guestConfigElement = element.element(ELEMENT_GUESTCONFIG);
|
||||||
|
if (guestConfigElement != null)
|
||||||
|
{
|
||||||
|
boolean allow = Boolean.parseBoolean(guestConfigElement.getTextTrim());
|
||||||
|
configElement.setAllowGuestConfig(allow);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return configElement;
|
return configElement;
|
||||||
|
@@ -135,7 +135,7 @@
|
|||||||
|
|
||||||
<div style="padding:4px"></div>
|
<div style="padding:4px"></div>
|
||||||
|
|
||||||
<a:panel label="#{msg.general_pref}" id="pref-panel" rendered="#{NavigationBean.isGuest == false}"
|
<a:panel label="#{msg.general_pref}" id="pref-panel" rendered="#{NavigationBean.isGuest == false || UserPreferencesBean.allowGuestConfig == true}"
|
||||||
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white">
|
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white">
|
||||||
<table cellspacing=2 cellpadding=2 border=0>
|
<table cellspacing=2 cellpadding=2 border=0>
|
||||||
<tr>
|
<tr>
|
||||||
|
Reference in New Issue
Block a user