You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Ha...@daimlerchrysler.com on 2002/01/18 15:03:19 UTC

Using the Group object

Hi!

I would like to let a user log in including a group. How do I keep track of the 
Group the current has logged into? Neither RunData nor TurbineSecurity nor 
AccessControlList contain methods for getting/setting the group. Basically, I 
would like to find out the Roles the User has in the current Group. 
AccessControlList provides a getRoles(Group group) method. Do I have to 
retrieve the current group by keeping track of its name and use 
TurbineSecurity.getGroup(name)? That would be a little awkward...

Thank,
Hauke

Dr. Hauke Hildebrandt
DaimlerChrysler AG - Research & Technology
Knowledge Based Engineering (RIC/EK)
Visitors: Alt-Moabit 96a, D-10559 Berlin
HPC: 096/BLN
Phone: +49 30 39982 271
Fax: +49 30 39982 107
E-Mail: Hauke.Hildebrandt@DaimlerChrysler.com
--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Using the Group object

Posted by Hugh Brien <hp...@home.com>.
At my company we use option 1 and it seems to work well for us.  We created
a new login action and set it there. We use GroupPeer to access the group
data and make sure we sort the results by GROUP_ID.  A user's default group
is the first in the list.
r,
Hugh
----- Original Message -----
From: "Brian Lawler" <bl...@branuity.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Tuesday, January 22, 2002 9:59 PM
Subject: Re: Using the Group object


> Hauke-
>
> There isn't really a notion of a "current group" in Turbine.  Rather, the
security system allows users to belong to >= 0 groups on the system.  There
are a few solutions to your problem:
>
> 1) Set the "current group" as part of the user object using the setTemp()
>
> 2) Extend the default user (i.e. TurbineUser)and add to it a property that
is the current group, and use that extended user class to do any further
security checking.  If you do this, you need to make sure that you update
TR.props to use your new user class when creating user objects, rather than
using the TurbineUser class.
>
> 3) Set the "current group" as part of the user object using the setPerm()
>
> Note that #1 & #2 will store the information with the HTTP session, #3
will store your extra information in the database.  In my application I have
done #2 since I needed to add extra functionality to the user object anyway.
>
> -Brian
>
> On Fri, 18 Jan 2002 15:03:19 +0100
> Hauke.Hildebrandt@daimlerchrysler.com wrote:
>
> > Hi!
> >
> > I would like to let a user log in including a group. How do I keep track
of the
> > Group the current has logged into? Neither RunData nor TurbineSecurity
nor
> > AccessControlList contain methods for getting/setting the group.
Basically, I
> > would like to find out the Roles the User has in the current Group.
> > AccessControlList provides a getRoles(Group group) method. Do I have to
> > retrieve the current group by keeping track of its name and use
> > TurbineSecurity.getGroup(name)? That would be a little awkward...
> >
> > Thank,
> > Hauke
> >
> > Dr. Hauke Hildebrandt
> > DaimlerChrysler AG - Research & Technology
> > Knowledge Based Engineering (RIC/EK)
> > Visitors: Alt-Moabit 96a, D-10559 Berlin
> > HPC: 096/BLN
> > Phone: +49 30 39982 271
> > Fax: +49 30 39982 107
> > E-Mail: Hauke.Hildebrandt@DaimlerChrysler.com
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
> --
> brian lawler
> branuity
> 617 front           | v: 415.217.5052
> san francisco 94111 | m: 415.307.5277
> brian@branuity.com  | f: 415.217.5060
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Using the Group object

Posted by Brian Lawler <bl...@branuity.com>.
Hauke-

There isn't really a notion of a "current group" in Turbine.  Rather, the security system allows users to belong to >= 0 groups on the system.  There are a few solutions to your problem:

1) Set the "current group" as part of the user object using the setTemp()

2) Extend the default user (i.e. TurbineUser)and add to it a property that is the current group, and use that extended user class to do any further security checking.  If you do this, you need to make sure that you update TR.props to use your new user class when creating user objects, rather than using the TurbineUser class.

3) Set the "current group" as part of the user object using the setPerm()

Note that #1 & #2 will store the information with the HTTP session, #3 will store your extra information in the database.  In my application I have done #2 since I needed to add extra functionality to the user object anyway.

-Brian

On Fri, 18 Jan 2002 15:03:19 +0100
Hauke.Hildebrandt@daimlerchrysler.com wrote:

> Hi!
> 
> I would like to let a user log in including a group. How do I keep track of the 
> Group the current has logged into? Neither RunData nor TurbineSecurity nor 
> AccessControlList contain methods for getting/setting the group. Basically, I 
> would like to find out the Roles the User has in the current Group. 
> AccessControlList provides a getRoles(Group group) method. Do I have to 
> retrieve the current group by keeping track of its name and use 
> TurbineSecurity.getGroup(name)? That would be a little awkward...
> 
> Thank,
> Hauke
> 
> Dr. Hauke Hildebrandt
> DaimlerChrysler AG - Research & Technology
> Knowledge Based Engineering (RIC/EK)
> Visitors: Alt-Moabit 96a, D-10559 Berlin
> HPC: 096/BLN
> Phone: +49 30 39982 271
> Fax: +49 30 39982 107
> E-Mail: Hauke.Hildebrandt@DaimlerChrysler.com
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


-- 
brian lawler
branuity
617 front           | v: 415.217.5052
san francisco 94111 | m: 415.307.5277
brian@branuity.com  | f: 415.217.5060



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>