BF [3018005] Role Access Update: updates all roles if I log in as System

https://sourceforge.net/tracker/index.php?func=detail&aid=3018005&group_id=176962&atid=879332
* Preserve old approach as a "Super" process to update all the roles in the installation, if the user chooses just System, it will update System, if System user leave empty the role then it updates ALL the roles in System
This commit is contained in:
Carlos Ruiz 2011-03-25 23:39:53 -05:00
parent 906d363bae
commit ad6b975ca1
1 changed files with 2 additions and 1 deletions

View File

@ -83,7 +83,7 @@ public class RoleAccessUpdate extends SvrProcess
{
List<Object> params = new ArrayList<Object>();
String whereClause = "1=1";
if (p_AD_Client_ID >= 0)
if (p_AD_Client_ID > 0)
{
whereClause += " AND AD_Client_ID=? ";
params.add(p_AD_Client_ID);
@ -96,6 +96,7 @@ public class RoleAccessUpdate extends SvrProcess
//sql += "ORDER BY AD_Client_ID, Name";
List<MRole> roles = new Query(getCtx(), MRole.Table_Name, whereClause, get_TrxName())
.setOnlyActiveRecords(true)
.setParameters(params)
.setOrderBy("AD_Client_ID, Name")
.list();