From 52ab6047ab31c9fb6fa9dc85e31fcf94f259edc0 Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Mon, 5 Mar 2007 01:13:28 +0000 Subject: [PATCH] BF [ 1673731 ] On login, show only orgs with write access --- dbPort/src/org/compiere/util/Login.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dbPort/src/org/compiere/util/Login.java b/dbPort/src/org/compiere/util/Login.java index b812d80fd7..c934d6f756 100644 --- a/dbPort/src/org/compiere/util/Login.java +++ b/dbPort/src/org/compiere/util/Login.java @@ -28,7 +28,11 @@ import org.compiere.model.*; /** - * Login Manager + * Login Manager + *

Change log + *

* * @author Jorg Janke * @version $Id: Login.java,v 1.6 2006/10/02 05:19:06 jjanke Exp $ @@ -469,9 +473,9 @@ public class Login + " AND o.IsActive='Y' AND o.IsSummary='N'" + " AND (r.IsAccessAllOrgs='Y' " + "OR (r.IsUseUserOrgAccess='N' AND o.AD_Org_ID IN (SELECT AD_Org_ID FROM AD_Role_OrgAccess ra " - + "WHERE ra.AD_Role_ID=r.AD_Role_ID AND ra.IsActive='Y')) " + + "WHERE ra.AD_Role_ID=r.AD_Role_ID AND ra.IsActive='Y' AND ra.IsReadOnly='N')) " + "OR (r.IsUseUserOrgAccess='Y' AND o.AD_Org_ID IN (SELECT AD_Org_ID FROM AD_User_OrgAccess ua " - + "WHERE ua.AD_User_ID=? AND ua.IsActive='Y'))" // #3 + + "WHERE ua.AD_User_ID=? AND ua.IsActive='Y' AND ua.IsReadOnly='N'))" // #3 + ") " + "ORDER BY o.Name"; //