mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.2 to HEAD
8282: Merged V2.1-A to V2.2 8263: Added debug error logging for NavigationBean getCompanyHomeVisible and getGuestHomeVisible. 8272: Program to load Alfresco with Person objects 8377: Merged V2.1 to V2.2 8374: Fix for AR-2087 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8502 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -92,6 +92,7 @@ public class NavigationBean implements Serializable
|
|||||||
/** Public JSF Bean name */
|
/** Public JSF Bean name */
|
||||||
public static final String BEAN_NAME = "NavigationBean";
|
public static final String BEAN_NAME = "NavigationBean";
|
||||||
|
|
||||||
|
private static Log logger = LogFactory.getLog(NavigationBean.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default constructor
|
* Default constructor
|
||||||
@@ -843,34 +844,56 @@ public class NavigationBean implements Serializable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true if the Company home node is accessable to the current user
|
* @return true if the Company home node is accessible to the current user
|
||||||
*/
|
*/
|
||||||
public boolean getCompanyHomeVisible()
|
public boolean getCompanyHomeVisible()
|
||||||
{
|
{
|
||||||
Node companyHomeNode = getCompanyHomeNode();
|
try
|
||||||
if (companyHomeNode != null)
|
|
||||||
{
|
{
|
||||||
return companyHomeNode.hasPermission(PermissionService.READ);
|
Node companyHomeNode = getCompanyHomeNode();
|
||||||
|
if (companyHomeNode != null)
|
||||||
|
{
|
||||||
|
return companyHomeNode.hasPermission(PermissionService.READ);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
catch (Throwable e)
|
||||||
{
|
{
|
||||||
return false;
|
if (logger.isDebugEnabled())
|
||||||
|
{
|
||||||
|
logger.debug("getCompanyHomeVisible failed", e);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true if the Guest home node is accessable to the current user
|
* @return true if the Guest home node is accessible to the current user
|
||||||
*/
|
*/
|
||||||
public boolean getGuestHomeVisible()
|
public boolean getGuestHomeVisible()
|
||||||
{
|
{
|
||||||
if (this.getAuthService().guestUserAuthenticationAllowed())
|
try
|
||||||
{
|
{
|
||||||
Node guestHome = getGuestHomeNode();
|
if (this.getAuthService().guestUserAuthenticationAllowed())
|
||||||
return guestHome != null && guestHome.hasPermission(PermissionService.READ);
|
{
|
||||||
|
Node guestHome = getGuestHomeNode();
|
||||||
|
return guestHome != null && guestHome.hasPermission(PermissionService.READ);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
catch (Throwable e)
|
||||||
{
|
{
|
||||||
return false;
|
if (logger.isDebugEnabled())
|
||||||
|
{
|
||||||
|
logger.debug("getGuestHomeVisible failed", e);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user