IDEMPIERE-893 IDEMPIERE-3936 Info Window to maintain Support Roles / fix permissions
This commit is contained in:
parent
71d7f52615
commit
bbf28092bb
|
@ -0,0 +1,7 @@
|
||||||
|
DELETE FROM AD_InfoWindow_Access WHERE ad_infowindow_id IN (SELECT ad_infowindow_id FROM ad_infowindow iw JOIN ad_table t ON (iw.ad_table_id=t.ad_table_id) WHERE t.AccessLevel='4') AND ad_role_id IN (SELECT ad_role_id FROM ad_role WHERE ismanual='N' AND isactive='Y' AND userlevel!='S ');
|
||||||
|
|
||||||
|
DELETE FROM AD_InfoWindow_Access WHERE ad_infowindow_id IN (SELECT ad_infowindow_id FROM ad_infowindow iw JOIN ad_table t ON (iw.ad_table_id=t.ad_table_id) WHERE t.AccessLevel IN ('1','2','3')) AND ad_role_id IN (SELECT ad_role_id FROM ad_role WHERE ismanual='N' AND isactive='Y' AND userlevel='S ');
|
||||||
|
|
||||||
|
SELECT register_migration_script('201908201457_IDEMPIERE-3936.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
DELETE FROM AD_InfoWindow_Access WHERE ad_infowindow_id IN (SELECT ad_infowindow_id FROM ad_infowindow iw JOIN ad_table t ON (iw.ad_table_id=t.ad_table_id) WHERE t.AccessLevel='4') AND ad_role_id IN (SELECT ad_role_id FROM ad_role WHERE ismanual='N' AND isactive='Y' AND userlevel!='S ');
|
||||||
|
|
||||||
|
DELETE FROM AD_InfoWindow_Access WHERE ad_infowindow_id IN (SELECT ad_infowindow_id FROM ad_infowindow iw JOIN ad_table t ON (iw.ad_table_id=t.ad_table_id) WHERE t.AccessLevel IN ('1','2','3')) AND ad_role_id IN (SELECT ad_role_id FROM ad_role WHERE ismanual='N' AND isactive='Y' AND userlevel='S ');
|
||||||
|
|
||||||
|
SELECT register_migration_script('201908201457_IDEMPIERE-3936.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -85,7 +85,9 @@ BEGIN
|
||||||
|| r.ad_role_id
|
|| r.ad_role_id
|
||||||
|| ','||r.ad_client_id||','||r.ad_org_id||',''Y'', statement_timestamp(),0, statement_timestamp(),0 FROM AD_InfoWindow i LEFT JOIN AD_InfoWindow_Access ia ON (ia.AD_Role_ID='
|
|| ','||r.ad_client_id||','||r.ad_org_id||',''Y'', statement_timestamp(),0, statement_timestamp(),0 FROM AD_InfoWindow i LEFT JOIN AD_InfoWindow_Access ia ON (ia.AD_Role_ID='
|
||||||
|| r.ad_role_id
|
|| r.ad_role_id
|
||||||
|| ' AND i.AD_InfoWindow_ID = ia.AD_InfoWindow_ID) WHERE i.AD_Client_ID IN (0,'||r.ad_client_id||') AND ia.AD_InfoWindow_ID IS NULL';
|
|| ' AND i.AD_InfoWindow_ID = ia.AD_InfoWindow_ID) INNER JOIN AD_Table tt ON (i.AD_Table_ID=tt.AD_Table_ID) WHERE i.AD_Client_ID IN (0,'||r.ad_client_id||') AND ia.AD_InfoWindow_ID IS NULL AND tt.AccessLevel IN '
|
||||||
|
|| roleaccesslevel;
|
||||||
|
|
||||||
|
|
||||||
EXECUTE sqlins;
|
EXECUTE sqlins;
|
||||||
|
|
||||||
|
|
|
@ -496,7 +496,9 @@ public final class MRole extends X_AD_Role
|
||||||
+ " FROM AD_InfoWindow i LEFT JOIN AD_InfoWindow_Access ia ON "
|
+ " FROM AD_InfoWindow i LEFT JOIN AD_InfoWindow_Access ia ON "
|
||||||
+ "(ia.AD_Role_ID=" + getAD_Role_ID()
|
+ "(ia.AD_Role_ID=" + getAD_Role_ID()
|
||||||
+ " AND i.AD_InfoWindow_ID = ia.AD_InfoWindow_ID) "
|
+ " AND i.AD_InfoWindow_ID = ia.AD_InfoWindow_ID) "
|
||||||
+ "WHERE i.AD_Client_ID IN (0," + getAD_Client_ID() + ") AND ia.AD_InfoWindow_ID IS NULL";
|
+ " INNER JOIN AD_Table tt ON (i.AD_Table_ID=tt.AD_Table_ID) "
|
||||||
|
+ "WHERE i.AD_Client_ID IN (0," + getAD_Client_ID() + ") AND ia.AD_InfoWindow_ID IS NULL"
|
||||||
|
+ " AND tt.AccessLevel IN ";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fill AD_xx_Access
|
* Fill AD_xx_Access
|
||||||
|
@ -537,7 +539,7 @@ public final class MRole extends X_AD_Role
|
||||||
int form = DB.executeUpdateEx(sqlForm + roleAccessLevel, get_TrxName());
|
int form = DB.executeUpdateEx(sqlForm + roleAccessLevel, get_TrxName());
|
||||||
int wf = DB.executeUpdateEx(sqlWorkflow + roleAccessLevel, get_TrxName());
|
int wf = DB.executeUpdateEx(sqlWorkflow + roleAccessLevel, get_TrxName());
|
||||||
int docact = DB.executeUpdateEx(sqlDocAction, get_TrxName());
|
int docact = DB.executeUpdateEx(sqlDocAction, get_TrxName());
|
||||||
int info = DB.executeUpdateEx(sqlInfo, get_TrxName());
|
int info = DB.executeUpdateEx(sqlInfo + roleAccessLevel, get_TrxName());
|
||||||
|
|
||||||
loadAccess(true);
|
loadAccess(true);
|
||||||
return "@AD_Window_ID@ #" + win
|
return "@AD_Window_ID@ #" + win
|
||||||
|
|
Loading…
Reference in New Issue