return ((MenuDAO) factory.getDAO(IConstants.CLASS_MENU_DAO));
}
private boolean hasPrivilege(String tagName, String privilegeName, UserPrivilegeList privList)
{
PrivilegeVO priv = null;
if(privilegeName.equalsIgnoreCase("event"))
{
privilegeName = IConstants.REPORT_NAME_EMERGENCY_EVENT;
}
priv = privList.getPrivilegeByName(privilegeName);
if (priv == null)
{
return false;
}
if(tagName.equalsIgnoreCase("CreateMenu"))
{
if(adminElemns.contains(priv.getPrivilegeName()))
{
if (priv.hasManagerAccess())
{
return true;
}
}
else
{
if ( priv.hasAuthorAccess() || priv.hasEditorAccess() || priv.hasManagerAccess())
{
return true;
}
}
}
else if(tagName.equalsIgnoreCase("SubMenu"))
{
if (priv.hasReadAccess() || priv.hasAuthorAccess() || priv.hasEditorAccess() || priv.hasManagerAccess())
{
return true;
}
}
return false;