From fad018241a4768acf473677672f0e086c233090a Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 26 Aug 2013 12:52:25 -0500 Subject: [PATCH] IDEMPIERE-1160 Hide potentially dangerous stuff from non-admin users / set new admin role with advanced permission - set zul path on dashboard content advanced --- .../i1.0c-release/oracle/201308261242_IDEMPIERE-1160.sql | 8 ++++++++ .../postgresql/201308261242_IDEMPIERE-1160.sql | 8 ++++++++ org.adempiere.base/src/org/compiere/model/MSetup.java | 2 ++ 3 files changed, 18 insertions(+) create mode 100644 migration/i1.0c-release/oracle/201308261242_IDEMPIERE-1160.sql create mode 100644 migration/i1.0c-release/postgresql/201308261242_IDEMPIERE-1160.sql diff --git a/migration/i1.0c-release/oracle/201308261242_IDEMPIERE-1160.sql b/migration/i1.0c-release/oracle/201308261242_IDEMPIERE-1160.sql new file mode 100644 index 0000000000..1bd401bf1f --- /dev/null +++ b/migration/i1.0c-release/oracle/201308261242_IDEMPIERE-1160.sql @@ -0,0 +1,8 @@ +-- Aug 26, 2013 12:41:41 PM COT +-- IDEMPIERE-1160 Hide potentially dangerous stuff from non-admin users +UPDATE AD_Field SET IsAdvancedField='Y',Updated=TO_DATE('2013-08-26 12:41:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56486 +; + +SELECT register_migration_script('201308261242_IDEMPIERE-1160.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201308261242_IDEMPIERE-1160.sql b/migration/i1.0c-release/postgresql/201308261242_IDEMPIERE-1160.sql new file mode 100644 index 0000000000..6d8ff35dbb --- /dev/null +++ b/migration/i1.0c-release/postgresql/201308261242_IDEMPIERE-1160.sql @@ -0,0 +1,8 @@ +-- Aug 26, 2013 12:41:41 PM COT +-- IDEMPIERE-1160 Hide potentially dangerous stuff from non-admin users +UPDATE AD_Field SET IsAdvancedField='Y',Updated=TO_TIMESTAMP('2013-08-26 12:41:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56486 +; + +SELECT register_migration_script('201308261242_IDEMPIERE-1160.sql') FROM dual +; + diff --git a/org.adempiere.base/src/org/compiere/model/MSetup.java b/org.adempiere.base/src/org/compiere/model/MSetup.java index 5a98228d7f..1713c1347c 100644 --- a/org.adempiere.base/src/org/compiere/model/MSetup.java +++ b/org.adempiere.base/src/org/compiere/model/MSetup.java @@ -226,6 +226,7 @@ public final class MSetup admin.setUserLevel(MRole.USERLEVEL_ClientPlusOrganization); admin.setPreferenceType(MRole.PREFERENCETYPE_Client); admin.setIsShowAcct(true); + admin.setIsAccessAdvanced(true); if (!admin.save()) { String err = "Admin Role A NOT inserted"; @@ -252,6 +253,7 @@ public final class MSetup MRole user = new MRole (m_ctx, 0, m_trx.getTrxName()); user.setClientOrg(m_client); user.setName(name); + user.setIsAccessAdvanced(false); if (!user.save()) { String err = "User Role A NOT inserted";