I very much appreciate your predicament.  I have a very similar 
situation.  Since the Turbine security system in Turbine 2 is limited 
you will have to come up with some sort of hack.  I have two suggestions:

Hack 1) Have each group be a survey.  You noted the problem with this is 
that you can't get a list of groups that a person is a member of.  Well 
to hack your way through that you can write some custom SQL code to 
retrieve a list of groups that a "Responder" is a member of.

Hack 2) Create a new table USER_SURVEY which relates the TURBINE_USER 
table to the surveys.  So it would have the columns USER_ID, and 
SURVEY_ID.  You can consult the Extend User Howto on the website on how 
to do this.  You will need to create a TurbineUserAdapter and a 
TurbineUserPeerAdapter to implement the retrieveByPK methods for torque.

Hope this helps!

- Dan Diephouse

Phillip Rhodes wrote:

> all,
>
> I am writing a survey application.  That is, users login and based 
> upon their identity will see a set of surveys that they can respond to.
>
> There may be thousands of users, and a hundred different surveys.  I 
> am unsure how I would use the Turbine security system to do this.  How 
> would I be able to get a list of surveys that a user can respond to?
>
> I would like to create a group for each survey and assign users to 
> that group with the role of "Responder"
>
> So for each survey, there would be a group
> Users who could respond to the survey would be given the role 
> "Responder" for the group that represents the survey they can respond to.
>
> My problem here is that  I KNOW the required role ("Responder"), but I 
> do not know the group membership of the user.  There is no way to get 
> the groups that a user is a member of.
>
> It seems that I must know the Group to get a role, but there is no way 
> to get groups for a given role.  I could then take those groups and do 
> a query against a table I created that defines a survey to group mapping.
>
>
> I would appreciate any thoughts.
>
> Phillip





--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to