Red Hat Bugzilla – Bug 1017089
New Kerberos user failed to be enabled
Last modified: 2013-11-26 22:36:54 EST
Description of problem:
After sign in with Kerberos the first time and clicked activated link,
zanata failed to enable that user.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Log in with a new user
2. Click activation link in activation email.
3. Log in
The user was disabled.
The user should be enabled.
This was apparently being caused by changes to our entity classes (access type).
This should be fixed by https://github.com/zanata/zanata-server/commit/27711d6b4c9019a00e1f78a9447215275895919e which reverts the Lombok/field-based changes to our entities.
Apparently Hibernate's dirtiness detection isn't triggered when using field-based reflection from Seam's IdentityManager.enableUser() and grantRole() (probably because they never call *any* methods on the entities). Moving the relevant Seam annotations for HAccount from the fields (HAccount.enabled and HAccount.roles) back to accessor methods seems to fix it.
However, due to https://hibernate.atlassian.net/browse/HHH-3718 the use of field access for the id field of entities could be causing a performance problem by preventing lazy loading. See also http://blog.xebia.com/2009/06/13/jpa-implementation-patterns-field-access-vs-property-access/ and http://stackoverflow.com/a/3739197/14379
I suggest we try field access again for Zanata 3.2, but with annotated methods and property access just for the Seam identity properties and for all the entity id fields.
Could you please give this a quick retest against 3.1.2-SNAPSHOT?
VERIFIED with Zanata version 3.1.1-SNAPSHOT (20131011-1008)
Closing VERIFIED bugs for Zanata versions <= 3.1.