diff --git a/migration/i1.0b-release/oracle/20130617121500_IDEMPIERE-893.sql b/migration/i1.0b-release/oracle/20130617121500_IDEMPIERE-893.sql new file mode 100644 index 0000000000..98093e6445 --- /dev/null +++ b/migration/i1.0b-release/oracle/20130617121500_IDEMPIERE-893.sql @@ -0,0 +1,100 @@ +-- Jun 14, 2013 6:22:47 PM COT +-- IDEMPIERE-893 Use AD_InfoWindow_Access instead of DPViews for access to info windows +UPDATE AD_Field SET DisplayLogic='@IsMasterRole@=N & @#UIClient@=''swing''',Updated=TO_DATE('2013-06-14 18:22:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50176 +; + +-- Jun 14, 2013 6:22:57 PM COT +UPDATE AD_Field SET DisplayLogic='@IsMasterRole@=N & @#UIClient@=''swing''',Updated=TO_DATE('2013-06-14 18:22:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50170 +; + +-- Jun 14, 2013 6:23:06 PM COT +UPDATE AD_Field SET DisplayLogic='@IsMasterRole@=N & @#UIClient@=''swing''',Updated=TO_DATE('2013-06-14 18:23:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50169 +; + +-- Jun 14, 2013 6:23:17 PM COT +UPDATE AD_Field SET DisplayLogic='@IsMasterRole@=N & @#UIClient@=''swing''',Updated=TO_DATE('2013-06-14 18:23:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50172 +; + +-- Jun 14, 2013 6:23:27 PM COT +UPDATE AD_Field SET DisplayLogic='@IsMasterRole@=N & @#UIClient@=''swing''',Updated=TO_DATE('2013-06-14 18:23:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50173 +; + +-- Jun 14, 2013 6:23:37 PM COT +UPDATE AD_Field SET DisplayLogic='@IsMasterRole@=N & @#UIClient@=''swing''',Updated=TO_DATE('2013-06-14 18:23:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50174 +; + +-- Jun 14, 2013 6:23:50 PM COT +UPDATE AD_Field SET DisplayLogic='@IsMasterRole@=N & @#UIClient@=''swing''',Updated=TO_DATE('2013-06-14 18:23:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50175 +; + +-- Jun 14, 2013 6:24:04 PM COT +UPDATE AD_Field SET DisplayLogic='@IsMasterRole@=N & @#UIClient@=''swing''',Updated=TO_DATE('2013-06-14 18:24:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50177 +; + +-- Jun 17, 2013 6:34:24 PM COT +UPDATE AD_Field SET SeqNo=300, IsDisplayed='Y', XPosition=5,Updated=TO_DATE('2013-06-17 18:34:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50178 +; + +-- Jun 17, 2013 6:34:24 PM COT +UPDATE AD_Field SET SeqNo=310, AD_FieldGroup_ID=50000, IsDisplayed='Y', XPosition=2,Updated=TO_DATE('2013-06-17 18:34:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50176 +; + +-- Jun 17, 2013 6:34:24 PM COT +UPDATE AD_Field SET SeqNo=320, IsDisplayed='Y', XPosition=5,Updated=TO_DATE('2013-06-17 18:34:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50170 +; + +-- Jun 17, 2013 6:34:24 PM COT +UPDATE AD_Field SET SeqNo=330, IsDisplayed='Y', XPosition=2,Updated=TO_DATE('2013-06-17 18:34:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50174 +; + +-- Jun 17, 2013 6:34:25 PM COT +UPDATE AD_Field SET SeqNo=350, IsDisplayed='Y', XPosition=2,Updated=TO_DATE('2013-06-17 18:34:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50172 +; + +-- Jun 17, 2013 6:34:25 PM COT +UPDATE AD_Field SET SeqNo=370, IsDisplayed='Y', XPosition=2,Updated=TO_DATE('2013-06-17 18:34:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50169 +; + +update ad_infowindow_access set isactive='N' +where ad_role_id in (select ad_role_id from ad_role where allow_info_asset='N') +and ad_infowindow_id in (select ad_infowindow_id from ad_infowindow where ad_table_id=(select ad_table_id from ad_table where tablename='A_Asset')) +; + +update ad_infowindow_access set isactive='N' +where ad_role_id in (select ad_role_id from ad_role where allow_info_bpartner='N') +and ad_infowindow_id in (select ad_infowindow_id from ad_infowindow where ad_table_id=(select ad_table_id from ad_table where tablename='C_BPartner')) +; + +update ad_infowindow_access set isactive='N' +where ad_role_id in (select ad_role_id from ad_role where allow_info_inout='N') +and ad_infowindow_id in (select ad_infowindow_id from ad_infowindow where ad_table_id=(select ad_table_id from ad_table where tablename='M_InOut')) +; + +update ad_infowindow_access set isactive='N' +where ad_role_id in (select ad_role_id from ad_role where allow_info_invoice='N') +and ad_infowindow_id in (select ad_infowindow_id from ad_infowindow where ad_table_id=(select ad_table_id from ad_table where tablename='C_Invoice')) +; + +update ad_infowindow_access set isactive='N' +where ad_role_id in (select ad_role_id from ad_role where allow_info_order='N') +and ad_infowindow_id in (select ad_infowindow_id from ad_infowindow where ad_table_id=(select ad_table_id from ad_table where tablename='C_Order')) +; + +update ad_infowindow_access set isactive='N' +where ad_role_id in (select ad_role_id from ad_role where allow_info_payment='N') +and ad_infowindow_id in (select ad_infowindow_id from ad_infowindow where ad_table_id=(select ad_table_id from ad_table where tablename='C_Payment')) +; + +update ad_infowindow_access set isactive='N' +where ad_role_id in (select ad_role_id from ad_role where allow_info_product='N') +and ad_infowindow_id in (select ad_infowindow_id from ad_infowindow where ad_table_id=(select ad_table_id from ad_table where tablename='M_Product')) +; + +update ad_infowindow_access set isactive='N' +where ad_role_id in (select ad_role_id from ad_role where allow_info_resource='N') +and ad_infowindow_id in (select ad_infowindow_id from ad_infowindow where ad_table_id=(select ad_table_id from ad_table where tablename='S_ResourceAssignment')) +; + +SELECT register_migration_script('20130617121500_IDEMPIERE-893.sql') FROM dual +; + diff --git a/migration/i1.0b-release/postgresql/20130617121500_IDEMPIERE-893.sql b/migration/i1.0b-release/postgresql/20130617121500_IDEMPIERE-893.sql new file mode 100644 index 0000000000..56e34db1af --- /dev/null +++ b/migration/i1.0b-release/postgresql/20130617121500_IDEMPIERE-893.sql @@ -0,0 +1,100 @@ +-- Jun 14, 2013 6:22:47 PM COT +-- IDEMPIERE-893 Use AD_InfoWindow_Access instead of DPViews for access to info windows +UPDATE AD_Field SET DisplayLogic='@IsMasterRole@=N & @#UIClient@=''swing''',Updated=TO_TIMESTAMP('2013-06-14 18:22:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50176 +; + +-- Jun 14, 2013 6:22:57 PM COT +UPDATE AD_Field SET DisplayLogic='@IsMasterRole@=N & @#UIClient@=''swing''',Updated=TO_TIMESTAMP('2013-06-14 18:22:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50170 +; + +-- Jun 14, 2013 6:23:06 PM COT +UPDATE AD_Field SET DisplayLogic='@IsMasterRole@=N & @#UIClient@=''swing''',Updated=TO_TIMESTAMP('2013-06-14 18:23:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50169 +; + +-- Jun 14, 2013 6:23:17 PM COT +UPDATE AD_Field SET DisplayLogic='@IsMasterRole@=N & @#UIClient@=''swing''',Updated=TO_TIMESTAMP('2013-06-14 18:23:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50172 +; + +-- Jun 14, 2013 6:23:27 PM COT +UPDATE AD_Field SET DisplayLogic='@IsMasterRole@=N & @#UIClient@=''swing''',Updated=TO_TIMESTAMP('2013-06-14 18:23:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50173 +; + +-- Jun 14, 2013 6:23:37 PM COT +UPDATE AD_Field SET DisplayLogic='@IsMasterRole@=N & @#UIClient@=''swing''',Updated=TO_TIMESTAMP('2013-06-14 18:23:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50174 +; + +-- Jun 14, 2013 6:23:50 PM COT +UPDATE AD_Field SET DisplayLogic='@IsMasterRole@=N & @#UIClient@=''swing''',Updated=TO_TIMESTAMP('2013-06-14 18:23:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50175 +; + +-- Jun 14, 2013 6:24:04 PM COT +UPDATE AD_Field SET DisplayLogic='@IsMasterRole@=N & @#UIClient@=''swing''',Updated=TO_TIMESTAMP('2013-06-14 18:24:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50177 +; + +-- Jun 17, 2013 6:34:24 PM COT +UPDATE AD_Field SET SeqNo=300, IsDisplayed='Y', XPosition=5,Updated=TO_TIMESTAMP('2013-06-17 18:34:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50178 +; + +-- Jun 17, 2013 6:34:24 PM COT +UPDATE AD_Field SET SeqNo=310, AD_FieldGroup_ID=50000, IsDisplayed='Y', XPosition=2,Updated=TO_TIMESTAMP('2013-06-17 18:34:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50176 +; + +-- Jun 17, 2013 6:34:24 PM COT +UPDATE AD_Field SET SeqNo=320, IsDisplayed='Y', XPosition=5,Updated=TO_TIMESTAMP('2013-06-17 18:34:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50170 +; + +-- Jun 17, 2013 6:34:24 PM COT +UPDATE AD_Field SET SeqNo=330, IsDisplayed='Y', XPosition=2,Updated=TO_TIMESTAMP('2013-06-17 18:34:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50174 +; + +-- Jun 17, 2013 6:34:25 PM COT +UPDATE AD_Field SET SeqNo=350, IsDisplayed='Y', XPosition=2,Updated=TO_TIMESTAMP('2013-06-17 18:34:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50172 +; + +-- Jun 17, 2013 6:34:25 PM COT +UPDATE AD_Field SET SeqNo=370, IsDisplayed='Y', XPosition=2,Updated=TO_TIMESTAMP('2013-06-17 18:34:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50169 +; + +update ad_infowindow_access set isactive='N' +where ad_role_id in (select ad_role_id from ad_role where allow_info_asset='N') +and ad_infowindow_id in (select ad_infowindow_id from ad_infowindow where ad_table_id=(select ad_table_id from ad_table where tablename='A_Asset')) +; + +update ad_infowindow_access set isactive='N' +where ad_role_id in (select ad_role_id from ad_role where allow_info_bpartner='N') +and ad_infowindow_id in (select ad_infowindow_id from ad_infowindow where ad_table_id=(select ad_table_id from ad_table where tablename='C_BPartner')) +; + +update ad_infowindow_access set isactive='N' +where ad_role_id in (select ad_role_id from ad_role where allow_info_inout='N') +and ad_infowindow_id in (select ad_infowindow_id from ad_infowindow where ad_table_id=(select ad_table_id from ad_table where tablename='M_InOut')) +; + +update ad_infowindow_access set isactive='N' +where ad_role_id in (select ad_role_id from ad_role where allow_info_invoice='N') +and ad_infowindow_id in (select ad_infowindow_id from ad_infowindow where ad_table_id=(select ad_table_id from ad_table where tablename='C_Invoice')) +; + +update ad_infowindow_access set isactive='N' +where ad_role_id in (select ad_role_id from ad_role where allow_info_order='N') +and ad_infowindow_id in (select ad_infowindow_id from ad_infowindow where ad_table_id=(select ad_table_id from ad_table where tablename='C_Order')) +; + +update ad_infowindow_access set isactive='N' +where ad_role_id in (select ad_role_id from ad_role where allow_info_payment='N') +and ad_infowindow_id in (select ad_infowindow_id from ad_infowindow where ad_table_id=(select ad_table_id from ad_table where tablename='C_Payment')) +; + +update ad_infowindow_access set isactive='N' +where ad_role_id in (select ad_role_id from ad_role where allow_info_product='N') +and ad_infowindow_id in (select ad_infowindow_id from ad_infowindow where ad_table_id=(select ad_table_id from ad_table where tablename='M_Product')) +; + +update ad_infowindow_access set isactive='N' +where ad_role_id in (select ad_role_id from ad_role where allow_info_resource='N') +and ad_infowindow_id in (select ad_infowindow_id from ad_infowindow where ad_table_id=(select ad_table_id from ad_table where tablename='S_ResourceAssignment')) +; + +SELECT register_migration_script('20130617121500_IDEMPIERE-893.sql') FROM dual +; + diff --git a/org.adempiere.base/src/org/compiere/model/MInfoWindow.java b/org.adempiere.base/src/org/compiere/model/MInfoWindow.java index 54c0e7ed07..731dfbbc2f 100644 --- a/org.adempiere.base/src/org/compiere/model/MInfoWindow.java +++ b/org.adempiere.base/src/org/compiere/model/MInfoWindow.java @@ -59,14 +59,20 @@ public class MInfoWindow extends X_AD_InfoWindow } // MInfoWindow public static MInfoWindow get(String tableName, String trxName) { - Query query = new Query(Env.getCtx(), MTable.get(Env.getCtx(), I_AD_InfoWindow.Table_ID), I_AD_InfoWindow.COLUMNNAME_AD_Table_ID+"=? AND IsValid='Y' ", null); + Query query = new Query(Env.getCtx(), MTable.get(Env.getCtx(), MInfoWindow.Table_ID), MInfoWindow.COLUMNNAME_AD_Table_ID+"=? AND IsValid='Y' ", null); MTable table = MTable.get(Env.getCtx(), tableName); if (table != null) { - return query.setParameters(table.getAD_Table_ID()) + List iws = query.setParameters(table.getAD_Table_ID()) .setOrderBy("AD_Client_ID Desc, AD_Org_ID Desc, IsDefault Desc, AD_InfoWindow_ID Desc") .setOnlyActiveRecords(true) .setApplyAccessFilter(true) - .first(); + .list(); + // verify role has access and return the first with access / IDEMPIERE-893 + for (MInfoWindow iw : iws) { + Boolean access = MRole.getDefault().getInfoAccess(iw.getAD_InfoWindow_ID()); + if (access != null && access.booleanValue()) + return iw; + } } return null; } diff --git a/org.adempiere.ui.swing-feature/swingclient.product.launch b/org.adempiere.ui.swing-feature/swingclient.product.launch index 9f914eb8d8..313c7257a4 100644 --- a/org.adempiere.ui.swing-feature/swingclient.product.launch +++ b/org.adempiere.ui.swing-feature/swingclient.product.launch @@ -21,7 +21,7 @@ - + diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java index da460d60b6..9275a4abfe 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java @@ -369,52 +369,6 @@ public final class AEnv CacheMgt.get().reset(tableName, Record_ID); } // cacheReset - /** - * Validate permissions to access Info queries on the view menu - * @author kstan_79 - * @return true if access is allowed - */ - - public static boolean canAccessInfo(String infoWindowName) - { - boolean result=false; - int roleid= Env.getAD_Role_ID(Env.getCtx()); - String sqlRolePermission="Select COUNT(AD_ROLE_ID) AS ROWCOUNT FROM AD_ROLE WHERE AD_ROLE_ID=" + roleid - + " AND ALLOW_INFO_" + infoWindowName + "='Y'"; - - log.config(sqlRolePermission); - PreparedStatement prolestmt = null; - ResultSet rs = null; - try - { - prolestmt = DB.prepareStatement (sqlRolePermission, null); - - rs = prolestmt.executeQuery (); - - rs.next(); - - if (rs.getInt("ROWCOUNT")>0) - { - result=true; - } - else - { - return false; - } - } - catch (Exception e) - { - log.log(Level.SEVERE, "(1)", e); - } - finally - { - DB.close(rs, prolestmt); - } - - return result; - - } // canAccessInfo - public static void actionRefresh(Lookup lookup, Object value, boolean mandatory, boolean shortList) // IDEMPIERE 90 { if (lookup == null) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPViews.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPViews.java index b0060905fa..cfe9abef94 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPViews.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPViews.java @@ -19,6 +19,15 @@ import org.adempiere.webui.component.Window; import org.adempiere.webui.panel.InfoPanel; import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.window.InfoSchedule; +import org.compiere.model.I_A_Asset; +import org.compiere.model.I_C_BPartner; +import org.compiere.model.I_C_Invoice; +import org.compiere.model.I_C_Order; +import org.compiere.model.I_C_Payment; +import org.compiere.model.I_M_InOut; +import org.compiere.model.I_M_Product; +import org.compiere.model.I_S_ResourceAssignment; +import org.compiere.model.MInfoWindow; import org.compiere.model.MRole; import org.compiere.util.Env; import org.compiere.util.Msg; @@ -53,8 +62,8 @@ public class DPViews extends DashboardPanel implements EventListener { private Box createViewPanel() { Vbox vbox = new Vbox(); - - if (MRole.getDefault().isAllow_Info_Product()) + + if (MInfoWindow.get(I_M_Product.Table_Name, null) != null) { ToolBarButton btnViewItem = new ToolBarButton("InfoProduct"); btnViewItem.setSclass("link"); @@ -63,7 +72,7 @@ public class DPViews extends DashboardPanel implements EventListener { btnViewItem.addEventListener(Events.ON_CLICK, this); vbox.appendChild(btnViewItem); } - if (MRole.getDefault().isAllow_Info_BPartner()) + if (MInfoWindow.get(I_C_BPartner.Table_Name, null) != null) { ToolBarButton btnViewItem = new ToolBarButton("InfoBPartner"); btnViewItem.setSclass("link"); @@ -91,7 +100,7 @@ public class DPViews extends DashboardPanel implements EventListener { vbox.appendChild(btnViewItem); } vbox.appendChild(new Separator("horizontal")); - if (MRole.getDefault().isAllow_Info_Order()) + if (MInfoWindow.get(I_C_Order.Table_Name, null) != null) { ToolBarButton btnViewItem = new ToolBarButton("InfoOrder"); btnViewItem.setSclass("link"); @@ -100,7 +109,7 @@ public class DPViews extends DashboardPanel implements EventListener { btnViewItem.addEventListener(Events.ON_CLICK, this); vbox.appendChild(btnViewItem); } - if (MRole.getDefault().isAllow_Info_Invoice()) + if (MInfoWindow.get(I_C_Invoice.Table_Name, null) != null) { ToolBarButton btnViewItem = new ToolBarButton("InfoInvoice"); btnViewItem.setSclass("link"); @@ -109,7 +118,7 @@ public class DPViews extends DashboardPanel implements EventListener { btnViewItem.addEventListener(Events.ON_CLICK, this); vbox.appendChild(btnViewItem); } - if (MRole.getDefault().isAllow_Info_InOut()) + if (MInfoWindow.get(I_M_InOut.Table_Name, null) != null) { ToolBarButton btnViewItem = new ToolBarButton("InfoInOut"); btnViewItem.setSclass("link"); @@ -118,7 +127,7 @@ public class DPViews extends DashboardPanel implements EventListener { btnViewItem.addEventListener(Events.ON_CLICK, this); vbox.appendChild(btnViewItem); } - if (MRole.getDefault().isAllow_Info_Payment()) + if (MInfoWindow.get(I_C_Payment.Table_Name, null) != null) { ToolBarButton btnViewItem = new ToolBarButton("InfoPayment"); btnViewItem.setSclass("link"); @@ -135,7 +144,7 @@ public class DPViews extends DashboardPanel implements EventListener { // btnViewItem.addEventListener(Events.ON_CLICK, this); // vbox.appendChild(btnViewItem); // } - if (MRole.getDefault().isAllow_Info_Resource()) + if (MInfoWindow.get(I_S_ResourceAssignment.Table_Name, null) != null) { ToolBarButton btnViewItem = new ToolBarButton("InfoAssignment"); btnViewItem.setSclass("link"); @@ -144,7 +153,7 @@ public class DPViews extends DashboardPanel implements EventListener { btnViewItem.addEventListener(Events.ON_CLICK, this); vbox.appendChild(btnViewItem); } - if (MRole.getDefault().isAllow_Info_Asset()) + if (MInfoWindow.get(I_A_Asset.Table_Name, null) != null) { ToolBarButton btnViewItem = new ToolBarButton("InfoAsset"); btnViewItem.setSclass("link"); @@ -170,51 +179,49 @@ public class DPViews extends DashboardPanel implements EventListener { String actionCommand = btn.getName(); int WindowNo = 0; - if (actionCommand.equals("InfoProduct") && AEnv.canAccessInfo("PRODUCT")) + if (actionCommand.equals("InfoProduct")) { InfoPanel.showProduct(WindowNo); } - else if (actionCommand.equals("InfoBPartner") && AEnv.canAccessInfo("BPARTNER")) + else if (actionCommand.equals("InfoBPartner")) { InfoPanel.showBPartner(WindowNo); } - else if (actionCommand.equals("InfoAsset") && AEnv.canAccessInfo("ASSET")) + else if (actionCommand.equals("InfoAsset")) { InfoPanel.showAsset(WindowNo); } - else if (actionCommand.equals("InfoAccount") && - MRole.getDefault().isShowAcct() && - AEnv.canAccessInfo("ACCOUNT")) + else if (actionCommand.equals("InfoAccount")) { new org.adempiere.webui.acct.WAcctViewer(); } - else if (actionCommand.equals("InfoSchedule") && AEnv.canAccessInfo("SCHEDULE")) + else if (actionCommand.equals("InfoSchedule")) { InfoSchedule is = new InfoSchedule(null, false); is.setAttribute(Window.MODE_KEY, Mode.EMBEDDED); AEnv.showWindow(is); } - else if (actionCommand.equals("InfoOrder") && AEnv.canAccessInfo("ORDER")) + else if (actionCommand.equals("InfoOrder")) { InfoPanel.showOrder(WindowNo, ""); } - else if (actionCommand.equals("InfoInvoice") && AEnv.canAccessInfo("INVOICE")) + else if (actionCommand.equals("InfoInvoice")) { InfoPanel.showInvoice(WindowNo, ""); } - else if (actionCommand.equals("InfoInOut") && AEnv.canAccessInfo("INOUT")) + else if (actionCommand.equals("InfoInOut")) { InfoPanel.showInOut(WindowNo, ""); } - else if (actionCommand.equals("InfoPayment") && AEnv.canAccessInfo("PAYMENT")) + else if (actionCommand.equals("InfoPayment")) { InfoPanel.showPayment(WindowNo, ""); } - else if (actionCommand.equals("InfoCashLine") && AEnv.canAccessInfo("CASHJOURNAL")) - { - InfoPanel.showCashLine(WindowNo, ""); - } - else if (actionCommand.equals("InfoAssignment") && AEnv.canAccessInfo("RESOURCE")) +// else if (actionCommand.equals("InfoCashLine")) +// { +// InfoPanel.showCashLine(WindowNo, ""); +// } + else if (actionCommand.equals("InfoAssignment")) { InfoPanel.showAssignment(WindowNo, ""); }