Hi there,

I am new to acegi and have been working with it just over the weekend
so some of this stuff may be absolute bs but please bear with me on this.

I am currently evaluating the use of acegi for my open source project
jestate ( http://jestate.sourceforge.net )

Jestate is (currently) built with the following architecture.

struts --> spring (service) ---> spring (dao) --> hibernate

A lot of my methods in the service layer must take an ( Integer) userid.

( It would also be usefull if I could pass an object arround my jsp pages
which indicated the users id as this would be usefull for the
flyweight design pattern. )

The reason for this is that often a user will only be able to see a subset
of the data in the DB.

So it would be really cool if the User ( which implements UserDetails )
also had an id ( Integer ) properties.

That way I could implement my own AuthenticationDao which would
work directly with hibernate and return such a class.

If everything worked with a User interface rather than a concrete implimentation
it would also be possible for me to implement it myself ( this would allow me
to use xdoclet on it to generate hibernate mapping files).


Also is there any way that I could get this information into the service
beans without adding any ageci dependant code into my struts actions ?

I notice in the contacts example application that it is done by

snip=
SecureContext secureContext = ((SecureContext) ContextHolder.getContext());

final Authentication currentUser = secureContext.getAuthentication();

Contact[] myContacts = contactManager.getAllByOwner(currentUser.getPrincipal().toString());

=snip

in the SecureIndexController class.


Is there any way that I could instead move this stuff into my service layer so that all
authentication is taken out of my controler classes , this would make a cleaner
separation between business logic and security concerns in my application code.


Oh yeah one other thing, I am using acegi from source. I built it over the weekend myself.

Oh and one other thing if I can be of help integrating hibernate I would be more than
happy to contribute any source code to your project.


--b


------------------------------------------------------- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com _______________________________________________ Acegisecurity-developer mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer

Reply via email to