Nikhil,
The Peer objects are for the Torque-O-R database implementation of security.
If you want to use some other mechanism like LDAP, you will need to write
your own classes to replace the DbSecurityService class and the
DbUserManager class. Turbine comes with LDAP versions of these classes.
However, they do not work. You will need to put in some elbow grease to
make them work properly.
Rajeev
----- Original Message -----
From: "Nikhil G. Daddikar" <[EMAIL PROTECTED]>
To: "Turbine Users List" <[EMAIL PROTECTED]>
Sent: Monday, April 08, 2002 9:03 AM
Subject: Re: SecurityService & UserPeer Dependence
> What I am saying is that I want to use Turbine Security but I don't have
users in a relational database and the only
> reason UserPeer was invented is because RolePeer can do a join to get the
user id, which it could have got in a
> different way than through UserPeer.
>
> For example, UserPeer just had a getId(String username) method, that would
have sufficed.
>
> Thanks.
>
> ----- Original Message -----
>
> : Hi UserPeer was created for you to implement it.
> : Implement UserPeer to indicate which TABLE and COLUMN are to used by
> : TSecuritySystem. for example :
> :
> : public class YourPeer implements UserPeer
> : {
> : public static final String USER_ID = YOUR_TABLE.YOUR_ID_COLUMN;
> : ...
> : }
> :
> : and you must edit TR.conf to use your UserPeer impl.
> :
> :
> : On Mon, 2002-04-08 at 04:19, Nikhil G. Daddikar wrote:
> :
> :
> : > Folks,
> : >
> : > I have been studying Turbine (2.1) to see how to fit in my own User
> : > implementation. During that process I noticed a few things which I
> : > would like clarification on.
> : >
> : > Security classes Role, Permission and Group deal with USER_ID
(according
> : > to the schema). The concept of UserPeer has been introduced so that
> : > RolePeer.retrieve(User, Group) can do an SQL join to figure out the
> : > USER_ID from the USERNAME as indicated below in the code:
> : >
> : > UserPeer up =
> : > ((DBSecurityService)TurbineSecurity.getService())
> : > .getUserPeerInstance();
> : >
> : > criteria.add(up.getFullColumnName(UserPeer.USERNAME),
> : > user.getUserName());
> : > criteria.add(UserGroupRolePeer.GROUP_ID,
> : > ((Persistent)group).getPrimaryKey());
> : >
> : > criteria.addJoin(up.getFullColumnName(UserPeer.USER_ID),
> : > UserGroupRolePeer.USER_ID);
> : > criteria.addJoin(UserGroupRolePeer.ROLE_ID, RolePeer.ROLE_ID);
> : > criteria.toString();
> : > return retrieveSet(criteria);
> : >
> : > If the ID (int) was available in some way, the concept of UserPeer (as
> : > it is now) will disappear.
> : >
> : > In my case the User will be in a directory (accessible through LDAP)
and
> : > hence there will be no columns to join on. However, all users have a
> : > unique ID (int) and I still want to use the TurbineSecurity system
> : > (database form) which is quite great.
> : >
> : > Instead of depending on UserPeer's column names, if there was a way
to
> : > get the integer ID from the username, that would have sufficed.
> : >
> : > Now I don't know how to proceed.
> : >
> : > Have I missed anything? Any help will be greatly appreciated.
> : >
> : > Thanks.
> : > -ngd.
> : >
> : >
> : >
> : >
> : >
> : >
> : > --
> : > To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> : > For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
> : --
> : Leandro Rodrigo Saad Cruz
> : IT - Inter Business Tecnologia e Servicos (IB)
> : http://www.ibnetwork.com.br
> :
> :
> : --
> : To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> : For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
> :
> :
> :
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>