From 3500070d1e5e1e40726f70ec3dfe2e03db701415 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 4 Sep 2023 04:43:08 +0200 Subject: [PATCH] IDEMPIERE-5843 System support users (like SuperUser) cannot see (fix) preferences on tenants (#1992) IDEMPIERE-5174 / IDEMPIERE-3737 --- .../iD10/oracle/202309021535_IDEMPIERE-5843.sql | 13 +++++++++++++ .../iD10/postgresql/202309021535_IDEMPIERE-5843.sql | 10 ++++++++++ 2 files changed, 23 insertions(+) create mode 100644 migration/iD10/oracle/202309021535_IDEMPIERE-5843.sql create mode 100644 migration/iD10/postgresql/202309021535_IDEMPIERE-5843.sql diff --git a/migration/iD10/oracle/202309021535_IDEMPIERE-5843.sql b/migration/iD10/oracle/202309021535_IDEMPIERE-5843.sql new file mode 100644 index 0000000000..ff970a245d --- /dev/null +++ b/migration/iD10/oracle/202309021535_IDEMPIERE-5843.sql @@ -0,0 +1,13 @@ +-- IDEMPIERE-5843 System support users (like SuperUser) cannot see (fix) preferences on tenants +SELECT register_migration_script('202309021535_IDEMPIERE-5843.sql') FROM dual; + +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Sep 2, 2023, 3:45:38 PM CEST +UPDATE AD_Tab SET WhereClause='(AD_Client_ID = @#AD_Client_ID@ OR ((SELECT AD_Client_ID FROM AD_User WHERE AD_User_ID=@#AD_User_ID@) = 0))',Updated=TO_TIMESTAMP('2023-09-02 15:45:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=156 +; + +DELETE FROM AD_Preference WHERE AD_User_ID=0 +; + diff --git a/migration/iD10/postgresql/202309021535_IDEMPIERE-5843.sql b/migration/iD10/postgresql/202309021535_IDEMPIERE-5843.sql new file mode 100644 index 0000000000..311dc43f82 --- /dev/null +++ b/migration/iD10/postgresql/202309021535_IDEMPIERE-5843.sql @@ -0,0 +1,10 @@ +-- IDEMPIERE-5843 System support users (like SuperUser) cannot see (fix) preferences on tenants +SELECT register_migration_script('202309021535_IDEMPIERE-5843.sql') FROM dual; + +-- Sep 2, 2023, 3:45:38 PM CEST +UPDATE AD_Tab SET WhereClause='(AD_Client_ID = @#AD_Client_ID@ OR ((SELECT AD_Client_ID FROM AD_User WHERE AD_User_ID=@#AD_User_ID@) = 0))',Updated=TO_TIMESTAMP('2023-09-02 15:45:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=156 +; + +DELETE FROM AD_Preference WHERE AD_User_ID=0 +; +