details: https://code.openbravo.com/erp/devel/pi/rev/f830dbe7a70c changeset: 13427:f830dbe7a70c user: Iván Perdomo <ivan.perdomo <at> openbravo.com> date: Thu Aug 04 13:34:47 2011 +0200 summary: Issue 18077: Small fixes based on code-review - Set updatable in Role field - Fixes copy/pasted column in check constraints
details: https://code.openbravo.com/erp/devel/pi/rev/3dbaa4aed89f changeset: 13428:3dbaa4aed89f user: Iván Perdomo <ivan.perdomo <at> openbravo.com> date: Thu Aug 04 13:36:49 2011 +0200 summary: Issue 18077: Fixes OpenID Indentifier tab definition - Small code fix based on code review: * Set not updatable to OpenID_Identifier column * Set window to Standard to be able to remove association * Use uniqueResult() since we have a unique constraint in OpenID_Identifier column diffstat: modules/org.openbravo.service.integration.google/src-db/database/model/tables/OBSEIG_DEFAULTS.xml | 4 ++-- modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_COLUMN.xml | 2 +- modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_COLUMN.xml | 2 +- modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_TAB.xml | 2 +- modules/org.openbravo.service.integration.openid/src/org/openbravo/service/integration/openid/OpenIDManager.java | 5 +++-- 5 files changed, 8 insertions(+), 7 deletions(-) diffs (64 lines): diff -r 62ca9f6217be -r 3dbaa4aed89f modules/org.openbravo.service.integration.google/src-db/database/model/tables/OBSEIG_DEFAULTS.xml --- a/modules/org.openbravo.service.integration.google/src-db/database/model/tables/OBSEIG_DEFAULTS.xml Thu Aug 04 12:10:36 2011 +0200 +++ b/modules/org.openbravo.service.integration.google/src-db/database/model/tables/OBSEIG_DEFAULTS.xml Thu Aug 04 13:36:49 2011 +0200 @@ -55,7 +55,7 @@ <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/> </foreign-key> <check name="OBSEIG_DEF_NEWUACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check> - <check name="OBSEIG_DEFAULT_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check> - <check name="OBSEIG_DEFAULT_ISDEFAULT_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check> + <check name="OBSEIG_DEFAULT_ISACTIVE_CHECK"><![CDATA[ISNEWUSERACTIVE IN ('Y', 'N')]]></check> + <check name="OBSEIG_DEFAULT_ISDEFAULT_CHECK"><![CDATA[ISDEFAULT IN ('Y', 'N')]]></check> </table> </database> diff -r 62ca9f6217be -r 3dbaa4aed89f modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_COLUMN.xml --- a/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_COLUMN.xml Thu Aug 04 12:10:36 2011 +0200 +++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_COLUMN.xml Thu Aug 04 13:36:49 2011 +0200 @@ -147,7 +147,7 @@ <!--5887370AAF5A47C3AE119D29C4442A43--> <ISKEY><![CDATA[N]]></ISKEY> <!--5887370AAF5A47C3AE119D29C4442A43--> <ISPARENT><![CDATA[Y]]></ISPARENT> <!--5887370AAF5A47C3AE119D29C4442A43--> <ISMANDATORY><![CDATA[Y]]></ISMANDATORY> -<!--5887370AAF5A47C3AE119D29C4442A43--> <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE> +<!--5887370AAF5A47C3AE119D29C4442A43--> <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE> <!--5887370AAF5A47C3AE119D29C4442A43--> <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER> <!--5887370AAF5A47C3AE119D29C4442A43--> <SEQNO><![CDATA[90]]></SEQNO> <!--5887370AAF5A47C3AE119D29C4442A43--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED> diff -r 62ca9f6217be -r 3dbaa4aed89f modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_COLUMN.xml --- a/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_COLUMN.xml Thu Aug 04 12:10:36 2011 +0200 +++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_COLUMN.xml Thu Aug 04 13:36:49 2011 +0200 @@ -81,7 +81,7 @@ <!--31878640A2FE4C128F50DF1A4CE42C66--> <ISKEY><![CDATA[N]]></ISKEY> <!--31878640A2FE4C128F50DF1A4CE42C66--> <ISPARENT><![CDATA[N]]></ISPARENT> <!--31878640A2FE4C128F50DF1A4CE42C66--> <ISMANDATORY><![CDATA[Y]]></ISMANDATORY> -<!--31878640A2FE4C128F50DF1A4CE42C66--> <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE> +<!--31878640A2FE4C128F50DF1A4CE42C66--> <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE> <!--31878640A2FE4C128F50DF1A4CE42C66--> <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER> <!--31878640A2FE4C128F50DF1A4CE42C66--> <SEQNO><![CDATA[100]]></SEQNO> <!--31878640A2FE4C128F50DF1A4CE42C66--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED> diff -r 62ca9f6217be -r 3dbaa4aed89f modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_TAB.xml --- a/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_TAB.xml Thu Aug 04 12:10:36 2011 +0200 +++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_TAB.xml Thu Aug 04 13:36:49 2011 +0200 @@ -19,7 +19,7 @@ <!--FF808081314BA5A001314BA803930005--> <IMPORTFIELDS><![CDATA[N]]></IMPORTFIELDS> <!--FF808081314BA5A001314BA803930005--> <ISSORTTAB><![CDATA[N]]></ISSORTTAB> <!--FF808081314BA5A001314BA803930005--> <AD_MODULE_ID><![CDATA[FF8080813141B198013141B86DD70003]]></AD_MODULE_ID> -<!--FF808081314BA5A001314BA803930005--> <UIPATTERN><![CDATA[RO]]></UIPATTERN> +<!--FF808081314BA5A001314BA803930005--> <UIPATTERN><![CDATA[STD]]></UIPATTERN> <!--FF808081314BA5A001314BA803930005--> <SHOWPARENTBUTTONS><![CDATA[N]]></SHOWPARENTBUTTONS> <!--FF808081314BA5A001314BA803930005--></AD_TAB> diff -r 62ca9f6217be -r 3dbaa4aed89f modules/org.openbravo.service.integration.openid/src/org/openbravo/service/integration/openid/OpenIDManager.java --- a/modules/org.openbravo.service.integration.openid/src/org/openbravo/service/integration/openid/OpenIDManager.java Thu Aug 04 12:10:36 2011 +0200 +++ b/modules/org.openbravo.service.integration.openid/src/org/openbravo/service/integration/openid/OpenIDManager.java Thu Aug 04 13:36:49 2011 +0200 @@ -143,8 +143,9 @@ userCriteria.setFilterOnReadableClients(false); userCriteria.setFilterOnReadableOrganization(false); - if (userCriteria.count() > 0) { - u = userCriteria.list().get(0).getUserContact(); + OBSOIDUserIdentifier userIdentifier = (OBSOIDUserIdentifier) userCriteria.uniqueResult(); + if (userIdentifier != null) { + u = userIdentifier.getUserContact(); } return u; ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
