IDEMPIERE-1167 List of clients is not ordered on role panel - added also hiding roles without org access to avoid errors selecting wrong role / based on patch from Richard Morales
This commit is contained in:
parent
121ac12f86
commit
6e77ac8872
|
@ -1363,7 +1363,7 @@ public class Login
|
||||||
.append(" WHERE ur.IsActive='Y'")
|
.append(" WHERE ur.IsActive='Y'")
|
||||||
.append(" AND u.IsActive='Y'")
|
.append(" AND u.IsActive='Y'")
|
||||||
.append(" AND cli.IsActive='Y'")
|
.append(" AND cli.IsActive='Y'")
|
||||||
.append(" AND ur.AD_User_ID=?");
|
.append(" AND ur.AD_User_ID=? ORDER BY cli.Name");
|
||||||
PreparedStatement pstmt=null;
|
PreparedStatement pstmt=null;
|
||||||
ResultSet rs=null;
|
ResultSet rs=null;
|
||||||
try{
|
try{
|
||||||
|
@ -1496,7 +1496,9 @@ public class Login
|
||||||
else
|
else
|
||||||
sql.append("COALESCE(u.LDAPUser,u.Name)=?");
|
sql.append("COALESCE(u.LDAPUser,u.Name)=?");
|
||||||
sql.append(" AND r.IsMasterRole='N'");
|
sql.append(" AND r.IsMasterRole='N'");
|
||||||
sql.append(" AND u.IsActive='Y'").append(" AND EXISTS (SELECT * FROM AD_Client c WHERE u.AD_Client_ID=c.AD_Client_ID AND c.IsActive='Y')");
|
sql.append(" AND u.IsActive='Y' AND EXISTS (SELECT * FROM AD_Client c WHERE u.AD_Client_ID=c.AD_Client_ID AND c.IsActive='Y')");
|
||||||
|
// don't show roles without org access
|
||||||
|
sql.append(" AND (r.isaccessallorgs='Y' OR EXISTS (SELECT 1 FROM AD_Role_OrgAccess ro WHERE ro.AD_Role_ID=r.AD_Role_ID AND ro.IsActive='Y'))");
|
||||||
sql.append(" ORDER BY r.Name");
|
sql.append(" ORDER BY r.Name");
|
||||||
|
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
|
|
Loading…
Reference in New Issue