[JBoss JIRA] (GTNPORTAL-3365) Exception swallow in UserDaoImpl.persistUserInfo()
by Peter Palaga (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-3365?page=com.atlassian.jira.pl... ]
Peter Palaga updated GTNPORTAL-3365:
------------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 3.8.2.Final
(was: 3.6.4.Final)
Resolution: Done
https://github.com/gatein/gatein-portal/pull/864 was merged to master (a.k.a. 3.9.x) and 3.8.x
> Exception swallow in UserDaoImpl.persistUserInfo()
> --------------------------------------------------
>
> Key: GTNPORTAL-3365
> URL: https://issues.jboss.org/browse/GTNPORTAL-3365
> Project: GateIn Portal
> Issue Type: Task
> Security Level: Public(Everyone can see)
> Affects Versions: 3.6.3.Final
> Reporter: Vu Viet Phuong
> Assignee: Vu Viet Phuong
> Fix For: 3.8.2.Final, 3.9.0.Final
>
> Original Estimate: 4 hours
> Time Spent: 6 hours
> Remaining Estimate: 0 minutes
>
> Under "{{org.exoplatform.services.organization.idm}},
> focus on :
> {code:title=UserDAOImp.java|borderStyle=solid}
> public void persistUserInfo(User user, IdentitySession session) throws Exception
> {
> orgService.flush();
> AttributesManager am = session.getAttributesManager();
> ArrayList attributes = new ArrayList();
> /* ... */
> if (user.getPassword() != null)
> {
> if (orgService.getConfiguration().isPasswordAsAttribute())
> {
> attributes.add(new SimpleAttribute(USER_PASSWORD, user.getPassword()));
> }
> else
> {
> try
> {
> am.updatePassword(session.getPersistenceManager().findUser(user.getUserName()), user.getPassword());
> }
> catch (IdentityException e)
> {
> log.info("Cannot update password: " + user.getUserName() + "; ", e);
> }
> }
> }
> Attribute[] attrs = new Attribute[attributes.size()];
> attrs = (Attribute[])attributes.toArray(attrs);
> try
> {
> am.updateAttributes(user.getUserName(), attrs);
> }
> catch (IdentityException e)
> {
> log.info("Cannot update attributes for user: " + user.getUserName() + "; ", e);
> }
> }
> {code}
>
> The method {{saveUser(User, boolean) _throws Exception_}}
> calls
> {{persistUserInfo(User user, IdentitySession session) _throws Exception_}}.
>
> Whereas, deeper in the code, you can easily notice that exceptions are caught in this level and traced by a {{log.info}}:
> * first time in the password level
> * second time when updating all of the attributes.
> (!) Users want to be notified when an error occurs during user registration.
> As well as being aware of the type of the caught exception.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
9 years, 11 months
[JBoss JIRA] (GTNPORTAL-3495) Membership Pagination don't work
by Boubaker Khanfir (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-3495?page=com.atlassian.jira.pl... ]
Boubaker Khanfir updated GTNPORTAL-3495:
----------------------------------------
Affects Version/s: 3.5.9.Final
> Membership Pagination don't work
> --------------------------------
>
> Key: GTNPORTAL-3495
> URL: https://issues.jboss.org/browse/GTNPORTAL-3495
> Project: GateIn Portal
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Affects Versions: 3.5.9.Final
> Reporter: Boubaker Khanfir
> Attachments: plidm-ldap-membership-pagination.zip
>
>
> I attach a new unit test for a bug that I met in PL IDM 1.4.4.
> Test case description:
> 1/ add about 10 users in an LDAP group
> 2/ use SearchCriteria to paginate on the Members of this group
> => Problem: pagination doesn't work
> Why does it fails:
> Because in this method "org.picketlink.idm.impl.store.ldap.LDAPIdentityStoreImpl.resolveRelationships(IdentityStoreInvocationContext, IdentityObject, IdentityObjectRelationshipType, boolean, boolean, String, IdentityObjectSearchCriteria)" the attribute "IdentityObjectSearchCriteria" isn't used for pagination.
> To workaround this bug I had to use (skipPaginationInMembershipQuery=true). If the UI is buggy without this parameter to "true", I think it has to be *by default "true" in Config class* and may be even delete this option to not use pagination in Membership at all.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
9 years, 11 months
[JBoss JIRA] (GTNPORTAL-3495) Membership Pagination don't work
by Boubaker Khanfir (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-3495?page=com.atlassian.jira.pl... ]
Boubaker Khanfir updated GTNPORTAL-3495:
----------------------------------------
Attachment: plidm-ldap-membership-pagination.zip
> Membership Pagination don't work
> --------------------------------
>
> Key: GTNPORTAL-3495
> URL: https://issues.jboss.org/browse/GTNPORTAL-3495
> Project: GateIn Portal
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Affects Versions: 3.5.9.Final
> Reporter: Boubaker Khanfir
> Attachments: plidm-ldap-membership-pagination.zip
>
>
> I attach a new unit test for a bug that I met in PL IDM 1.4.4.
> Test case description:
> 1/ add about 10 users in an LDAP group
> 2/ use SearchCriteria to paginate on the Members of this group
> => Problem: pagination doesn't work
> Why does it fails:
> Because in this method "org.picketlink.idm.impl.store.ldap.LDAPIdentityStoreImpl.resolveRelationships(IdentityStoreInvocationContext, IdentityObject, IdentityObjectRelationshipType, boolean, boolean, String, IdentityObjectSearchCriteria)" the attribute "IdentityObjectSearchCriteria" isn't used for pagination.
> To workaround this bug I had to use (skipPaginationInMembershipQuery=true). If the UI is buggy without this parameter to "true", I think it has to be *by default "true" in Config class* and may be even delete this option to not use pagination in Membership at all.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
9 years, 11 months