Modified: 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/tomahawk/includes/appbarOpen.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/tomahawk/includes/appbarOpen.ftl?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/tomahawk/includes/appbarOpen.ftl
 (original)
+++ 
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/tomahawk/includes/appbarOpen.ftl
 Mon Dec 16 22:12:08 2013
@@ -21,8 +21,8 @@ under the License.
 <#if (externalLoginKey)?exists><#assign externalKeyParam = 
"?externalLoginKey=" + requestAttributes.externalLoginKey?if_exists></#if>
 <#assign ofbizServerName = 
application.getAttribute("_serverId")?default("default-server")>
 <#assign contextPath = request.getContextPath()>
-<#assign displayApps = 
Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName,
 "main")>
-<#assign displaySecondaryApps = 
Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName,
 "secondary")>
+<#assign displayApps = 
Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, 
userLogin, ofbizServerName, "main")>
+<#assign displaySecondaryApps = 
Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, 
userLogin, ofbizServerName, "secondary")>
 
 <#assign appModelMenu = 
Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,applicationMenuName,delegator,dispatcher)>
 <#if appModelMenu.getModelMenuItemByName(headerItem)?exists>
@@ -45,29 +45,19 @@ under the License.
             <#-- Primary Applications -->
             <#list displayApps as display>
               <#assign thisApp = display.getContextRoot()>
-              <#assign permission = true>
               <#assign selected = false>
-              <#assign permissions = display.getBasePermission()>
-              <#list permissions as perm>
-                <#if (perm != "NONE" && !security.hasEntityPermission(perm, 
"_VIEW", session))>
-                  <#-- User must have ALL permissions in the base-permission 
list -->
-                  <#assign permission = false>
-                </#if>
-              </#list>
-              <#if permission == true>
-                <#if thisApp == contextPath || contextPath + "/" == thisApp>
-                  <#assign selected = true>
-                </#if>
-                <#assign thisApp = StringUtil.wrapString(thisApp)>
-                <#assign thisURL = thisApp>
-                <#if thisApp != "/">
-                  <#assign thisURL = thisURL + "/control/main">
-                </#if>
-                <#if layoutSettings.suppressTab?exists && display.name == 
layoutSettings.suppressTab>
-                  <!-- do not display this component-->
-                <#else>
-                  <li<#if selected> class="selected"</#if>><a href="${thisURL 
+ externalKeyParam}"<#if uiLabelMap?exists> 
title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> 
title="${display.description}">${display.title}</#if></a></li>
-                </#if>
+              <#if thisApp == contextPath || contextPath + "/" == thisApp>
+                <#assign selected = true>
+              </#if>
+              <#assign thisApp = StringUtil.wrapString(thisApp)>
+              <#assign thisURL = thisApp>
+              <#if thisApp != "/">
+                <#assign thisURL = thisURL + "/control/main">
+              </#if>
+              <#if layoutSettings.suppressTab?exists && display.name == 
layoutSettings.suppressTab>
+                <!-- do not display this component-->
+              <#else>
+                <li<#if selected> class="selected"</#if>><a href="${thisURL + 
externalKeyParam}"<#if uiLabelMap?exists> 
title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> 
title="${display.description}">${display.title}</#if></a></li>
               </#if>
             </#list>
            </ul></li>
@@ -75,29 +65,19 @@ under the License.
             <#-- Secondary Applications -->
             <#list displaySecondaryApps as display>
               <#assign thisApp = display.getContextRoot()>
-              <#assign permission = true>
               <#assign selected = false>
-              <#assign permissions = display.getBasePermission()>
-              <#list permissions as perm>
-                <#if (perm != "NONE" && !security.hasEntityPermission(perm, 
"_VIEW", session))>
-                  <#-- User must have ALL permissions in the base-permission 
list -->
-                  <#assign permission = false>
-                </#if>
-              </#list>
-              <#if permission == true>
-                <#if thisApp == contextPath || contextPath + "/" == thisApp>
-                  <#assign selected = true>
-                </#if>
-                <#assign thisApp = StringUtil.wrapString(thisApp)>
-                <#assign thisURL = thisApp>
-                <#if thisApp != "/">
-                  <#assign thisURL = thisURL + "/control/main">
-                </#if>
-                <#if layoutSettings.suppressTab?exists && display.name == 
layoutSettings.suppressTab>
-                  <!-- do not display this component-->
-                <#else>
-                    <li<#if selected> class="selected"</#if>><a 
href="${thisURL + externalKeyParam}"<#if uiLabelMap?exists> 
title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> 
title="${display.description}">${display.title}</#if></a></li>
-                </#if>
+              <#if thisApp == contextPath || contextPath + "/" == thisApp>
+                <#assign selected = true>
+              </#if>
+              <#assign thisApp = StringUtil.wrapString(thisApp)>
+              <#assign thisURL = thisApp>
+              <#if thisApp != "/">
+                <#assign thisURL = thisURL + "/control/main">
+              </#if>
+              <#if layoutSettings.suppressTab?exists && display.name == 
layoutSettings.suppressTab>
+                <!-- do not display this component-->
+              <#else>
+                  <li<#if selected> class="selected"</#if>><a href="${thisURL 
+ externalKeyParam}"<#if uiLabelMap?exists> 
title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> 
title="${display.description}">${display.title}</#if></a></li>
               </#if>
             </#list>
             </ul>


Reply via email to