details: /erp/devel/pi/rev/8b98f543308c
changeset: 7883:8b98f543308c
user: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
date: Wed Jul 14 19:09:09 2010 +0530
summary: Fixes Issue 13484: User created on Initial Organization Setup has
Client Admin role
diffstat:
src/org/openbravo/erpCommon/ad_forms/InitialOrgSetup.java | 17 +++++++++-
src/org/openbravo/erpCommon/ad_forms/InitialOrgSetup_data.xsql | 2 +-
2 files changed, 17 insertions(+), 2 deletions(-)
diffs (46 lines):
diff -r 99818017822d -r 8b98f543308c
src/org/openbravo/erpCommon/ad_forms/InitialOrgSetup.java
--- a/src/org/openbravo/erpCommon/ad_forms/InitialOrgSetup.java Wed Jul 14
16:26:00 2010 +0530
+++ b/src/org/openbravo/erpCommon/ad_forms/InitialOrgSetup.java Wed Jul 14
19:09:09 2010 +0530
@@ -494,6 +494,21 @@
releaseRollbackConnection(conn);
return false;
}
+ String ad_role_id= SequenceIdData.getUUID();
+ if (InitialOrgSetupData.insertRole(conn, this, AD_Client_ID, ad_role_id,
name,AD_Org_ID) != 1) {
+ final String err = "InitialOrgSetup - CreateRole - Role NOT
inserted";
+ log4j.warn(err);
+ m_info.append(err).append(SALTO_LINEA);
+ releaseRollbackConnection(conn);
+ return false;
+ }
+ if (InitialOrgSetupData.insertRoleOrgAccess(conn, this, AD_Client_ID,
AD_Org_ID, ad_role_id) != 1) {
+ final String err = "InitialOrgSetup - CreateRole - Role Organization
NOT inserted";
+ log4j.warn(err);
+ m_info.append(err).append(SALTO_LINEA);
+ releaseRollbackConnection(conn);
+ return false;
+ }
if (log4j.isDebugEnabled())
log4j.debug("InitialOrgSetup - createOrg - USER INSERTED " + name);
// Info
@@ -515,7 +530,7 @@
// * Create User-Role
// OrgUser - User
- if (InitialOrgSetupData.insertUserRoles(conn, this, AD_Client_ID,
AD_User_U_ID, stradRoleId) != 1)
+ if (InitialOrgSetupData.insertUserRoles(conn, this, AD_Client_ID,
AD_User_U_ID, ad_role_id) != 1)
log4j.warn("InitialOrgSetup - createOrg - UserRole OrgUser+Org NOT
inserted");
releaseCommitConnection(conn);
} catch (final Exception e) {
diff -r 99818017822d -r 8b98f543308c
src/org/openbravo/erpCommon/ad_forms/InitialOrgSetup_data.xsql
--- a/src/org/openbravo/erpCommon/ad_forms/InitialOrgSetup_data.xsql Wed Jul
14 16:26:00 2010 +0530
+++ b/src/org/openbravo/erpCommon/ad_forms/InitialOrgSetup_data.xsql Wed Jul
14 19:09:09 2010 +0530
@@ -67,7 +67,7 @@
<![CDATA[
INSERT INTO AD_Role
(AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Role_ID,Name,
Description,UserLevel,ClientList,OrgList)
- VALUES (?,'0','Y',now(),'0',now(),'0',?,?,?,' CO',?,?)
+ VALUES (?,'0','Y',now(),'0',now(),'0',?,?,?,' O',?,?)
]]>
</Sql>
<Parameter name="AD_Client_ID"/>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits