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
--- a/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_COLUMN.xml Thu Aug 04 13:34:47 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>
--- a/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_TAB.xml Thu Aug 04 13:34:47 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>
--- a/modules/org.openbravo.service.integration.openid/src/org/openbravo/service/integration/openid/OpenIDManager.java Thu Aug 04 13:34:47 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;