Update of 
/var/cvs/contributions/CMSContainer_Modules/community/src/java/com/finalist/cmsc/services/community/security
In directory james.mmbase.org:/tmp/cvs-serv26337

Modified Files:
        UserDetailsHibernateService.java 
Log Message:
CMSC-1171 Enhance login-portlet - check handling of person status modes


See also: 
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Modules/community/src/java/com/finalist/cmsc/services/community/security
See also: http://www.mmbase.org/jira/browse/CMSC-1171


Index: UserDetailsHibernateService.java
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer_Modules/community/src/java/com/finalist/cmsc/services/community/security/UserDetailsHibernateService.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- UserDetailsHibernateService.java    27 Nov 2008 08:27:39 -0000      1.5
+++ UserDetailsHibernateService.java    5 Dec 2008 08:51:21 -0000       1.6
@@ -49,8 +49,12 @@
          throw new UsernameNotFoundException("User not found");
       }
       Person person = 
personService.getPersonByAuthenticationId(authentication.getId());
-      if (RegisterStatus.UNCONFIRMED.getName().equals(person.getActive())) {
-         throw new UsernameNotFoundException("User not confirm");
+      System.out.println(person.getActive());
+      if 
(RegisterStatus.UNCONFIRMED.getName().equalsIgnoreCase(person.getActive())) {
+         throw new UsernameNotFoundException("User is not confirmed");
+      }
+      if 
(RegisterStatus.BLOCKED.getName().equalsIgnoreCase(person.getActive())) {
+         throw new UsernameNotFoundException("User is blocked");
       }
       /* Get authorities */
       Set < Authority > authorities = authentication.getAuthorities();
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to