Am Freitag, den 19.05.2006, 20:01 +0200 schrieb Stefano Bagnara:
> I need more information.
> 
> As far as I know aliasing and forwarding is available only when the user 
> is a JamesUser.
> 
> The "UsersRepositoryAliasingForwarding" mailet is a mailet that compose 
> the "old" LocalDelivery mailet. I introduced it during a refactoring a 
> few months ago.
> 
> 1) We should add a check: if the user is not a JamesUser we simply skip 
> the aliasing/forwarding block, so we avoid the ClassCast.
> 
> But the problem is not so easy, and is not really there. The problem is 
> probably in a refactoring I did 2 months ago to avoid the use of 
> deprecated methods.
> 
> Before my refactoring, when adding users using RemoteManager the 
> remoteManager called the MailServer.addUser method if you were on the 
> localusers, otherwise it create new DefaultUser. the James.addUser was 
> instead creating a DefaultJamesUser by default.
> 
> In fact this is not so correct: the best way would be to invoke the 
> usersRepository.addUser method directly without using the DefaultUser 
> object from RemoteManager.
> 
> This is easy but is not a solution again.
> 
> The UsersFileRepository.addUser(username, password) method, creates 
> DefaultUsers and not DefaultJamesUsers by default.
> 
> One of the refactoring I planned for 2.4 was the 
> UsersRepository/Authentication one, so this will be fixed for 2.4 
> anyway, but we should also decide what to do for 2.3.
> 
> I would do at least:
> a. Add a check to UsersRepositoryAliasingForwarding to skip non 
> JamesUsers (easy bugfix)
> b. Change the remotemanager to user the 
> usersRepository.addUser(username, password) instead of creating a 
> DefaultUser and use the usersRepository.addUser(user).
> 
> Then we have further options:
> c1. do nothing else: we work differently from james 2.2 because newly 
> created users for FileUsersRepository will not support aliasing/forwarding.
> c2. we can change the FileUsersRepository.addUser method to create 
> DefaultJamesUsers by default
> c3. we can add a FileJamesUsersRepository identical to the 
> FileUsersRepository but creating DefaultJamesUsers by default and put 
> either put it as default in the config.xml or as an option.
> 
> My preference is for c2 or for c3 (adding it as the default).
> 
I agree.

> I can do this tonight or tomorrow but I don't know if we should stop the 
> a3 release or do it anyway letting users know it has critical bugs with 
> file based users repository.
> 
> My preference is to release the a3 anyway: if we never release we'll 
> always find similar bugs the day we vote for the following release :-(
> 
I agree here too.. its a alpha so we can release it with this bug..
Maybe if we release this people will find other bugs too.

> Stefano
> 
> PS: I will open a JIRA issue to track this soon.
> 
> Noel J. Bergman wrote:
> > Bernd Fondermann wrote:
> > 
> >> I set up vanilla james config and in the users-store section replaced
> >> the default db-store with file.
> > 
> >> java.lang.ClassCastException
> >> UsersRepositoryAliasingForwarding.java:193)
> > 
> > That is:  user = (JamesUser) usersRepository.getUserByName(username);
> > 
> > I'll check the code after lunch, but I seem to recall someone making some
> > changes in that area.
> > 
> >     --- Noel
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> !EXCUBATOR:1,446e09fd37021317318436!

bye
Norman

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to