Fixes issue 20457: Link removed in status bar if window not accessible
authorAugusto Mauch <augusto.mauch@openbravo.com>
Wed, 09 May 2012 15:43:52 +0200
changeset 16465 e720f25cba62
parent 16464 cec498bcc924
child 16466 3877d39c8130
Fixes issue 20457: Link removed in status bar if window not accessible

If a field with a link was shown in the status bar, the link was active regardless of the accessibility to the target window. Now, there will only be a link if the target window is accessible by the current role.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-statusbar.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-statusbar.js	Wed May 09 15:33:42 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-statusbar.js	Wed May 09 15:43:52 2012 +0200
@@ -420,7 +420,7 @@
         if (isc.Page.isRTL()) {
           msg += msgTmp;
         }
-        if (arrayTitleField.length === 6 && arrayTitleField[2][i] !== undef && arrayTitleField[3][i] !== undef && arrayTitleField[4][i] !== undef && arrayTitleField[5][i] !== undef) {
+        if (arrayTitleField.length === 6 && arrayTitleField[2][i] !== undef && arrayTitleField[3][i] !== undef && arrayTitleField[4][i] !== undef && arrayTitleField[5][i] !== undef && OB.AccessibleEntities[arrayTitleField[4][i]]) {
           msg += '<span class="' + (this.titleLinkStyle ? this.titleLinkStyle : '') + '" onclick="OB.Utilities.openDirectView(\'' + arrayTitleField[2][i] + '\', \'' + arrayTitleField[3][i] + '\', \'' + arrayTitleField[4][i] + '\', \'' + arrayTitleField[5][i] + '\')">' + rtlImgLink + rtlSep + arrayTitleField[0][i] + ltrSep + ltrImgLink + '</span>';
         } else {
           msg += '<span class="' + (this.titleLabelStyle ? this.titleLabelStyle : '') + '">' + rtlSep + arrayTitleField[0][i] + ltrSep + '</span>';