From: Martin H. <mho...@no...> - 2006-02-25 00:47:52
|
User: mholzner Date: 06/02/24 19:47:46 Modified: core/src/main/org/jboss/portal/core/security/jaas ModelLoginModule.java Log: 'fixed' getRoleNames(user) -> replaced with getRoles(user) to make it compile Revision Changes Path 1.7 +16 -16 jboss-portal/core/src/main/org/jboss/portal/core/security/jaas/ModelLoginModule.java (In the diff below, changes in quantity of whitespace are not shown.) Index: ModelLoginModule.java =================================================================== RCS file: /cvsroot/jboss/jboss-portal/core/src/main/org/jboss/portal/core/security/jaas/ModelLoginModule.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- ModelLoginModule.java 24 Feb 2006 23:07:42 -0000 1.6 +++ ModelLoginModule.java 25 Feb 2006 00:47:46 -0000 1.7 @@ -21,11 +21,14 @@ */ package org.jboss.portal.core.security.jaas; -import java.security.Principal; -import java.security.acl.Group; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; +import org.jboss.portal.common.transaction.Transactions; +import org.jboss.portal.core.model.NoSuchUserException; +import org.jboss.portal.core.model.Role; +import org.jboss.portal.core.model.User; +import org.jboss.portal.core.modules.RoleModule; +import org.jboss.portal.core.modules.UserModule; +import org.jboss.security.SimpleGroup; +import org.jboss.security.auth.spi.UsernamePasswordLoginModule; import javax.naming.InitialContext; import javax.naming.NamingException; @@ -33,21 +36,17 @@ import javax.security.auth.callback.CallbackHandler; import javax.security.auth.login.LoginException; import javax.transaction.TransactionManager; - -import org.jboss.portal.common.transaction.Transactions; -import org.jboss.portal.core.modules.UserModule; -import org.jboss.portal.core.modules.RoleModule; -import org.jboss.portal.core.model.User; -import org.jboss.portal.core.model.NoSuchUserException; -import org.jboss.portal.core.model.Role; -import org.jboss.security.SimpleGroup; -import org.jboss.security.auth.spi.UsernamePasswordLoginModule; +import java.security.Principal; +import java.security.acl.Group; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; /** * A login module that uses the user module. * * @author <a href="mailto:ju...@jb...">Julien Viet</a> - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ */ public class ModelLoginModule extends UsernamePasswordLoginModule @@ -121,7 +120,7 @@ if (havingRole != null) { boolean hasTheRole = false; - Set roles = getRoleModule().getRoleNames(user); + Set roles = getRoleModule().getRoles(user); for (Iterator i = roles.iterator(); i.hasNext();) { Role role = (Role)i.next(); @@ -140,6 +139,7 @@ } catch (NoSuchUserException e) { + //TODO: log or throw } catch (Exception e) { |