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]>