Hi,

Ok, I understand better your requirements.
I suggest you to create a class Group wich regroups users. If a user has the
role manager he can manage all users in groups he belongs.
Manager or accountant are business role, so you can create a service for
managements operations which only accessible by users who have the needed
role.

for annotations, please the link below:
http://www.jroller.com/habuma/entry/method_level_security_in_spring

Hope this may help you !
Ramzi

On Mon, Feb 8, 2010 at 8:43 PM, Arash <rakhs...@gmail.com> wrote:

>
> Thanks for your response.
>
> I am not trying to force myself to utilize <User, Role> relationship in
> AppFuse, I'm asking if there are any advantages over having an entity
> called
> Manager or Accountant that extends User.
> The approach you mentioned has an immediate flaw of cluttering the user
> code
> and having that entity to deal with more than what it should. The simplest
> complexity comes when you would like the manager to have a Collection<User>
> users for all the users his/her managing.
> I'm not understanding the "protect them by roles" via annotation. An
> example
> of this case would be very nice.
>
>  I guess I should have added that, I was afraid that I might be mixing two
> different things: 1. User/Role approach 2: extending User to add different
> types (with their fields & mapping). I want to know if these two approaches
> are accomplishing the same thing and if they are interchangeable. By
> extending user scenario and not utilize Role table in appFuse Would I have
> trouble down the road especially in the view part of the application.
>
> Thank you
> --
> View this message in context:
> http://n4.nabble.com/Different-types-of-User-tp1473383p1473842.html
>  Sent from the AppFuse - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
> For additional commands, e-mail: users-h...@appfuse.dev.java.net
>
>

Reply via email to