Go Back   CHECKBOX® Online Community > Checkbox® > CHECKBOX® Developer Kit

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-12-2008, 02:53 PM
smuschelli
Guest
 
Posts: n/a
Default Getting back a listing of surveys based off of User

We created a temporary User. I have assigned them to a survey survey security on the access list.

In code I log in as the user. call API ResponseTemplateManager.GetAvailableTemplatesAndFo lders
an dI always get back the entire list in the folder. all I want is a list that only that user has access to. Please advise on proper setup and use of API to return a listing based off of a User.

Thanks
Reply With Quote
  #2 (permalink)  
Old 08-13-2008, 04:26 PM
Senior Member
 
Join Date: Mar 2007
Posts: 201
Default

It is unclear exactly what you are mean to when you say “Temporary User” as Checkbox does not include a user of this type. For the purpose of my response I am going to assume you have created a new Checkbox user. If this is not correct please let me know.

What parameters did you include when calling the GetAvailableTemplatesAndFolders method? The parameters are:

///
/// Get ResponseTemplates and folders available to the logged-in user.
///

/// Logged-in user.
/// Folder id
/// Number of results to return per page of results.
/// Current page number of the result set.
/// Field to filter results on.
/// Value of filter.
/// Field to sort results on.
/// Sort order.
/// Permissions to check for ResponseTemplate access.
/// Total items matching filter
/// containing result.

For the scenario you describe, where paging and filter are not required, the following parameters should work. Note that CurrentPrincipal is the ExtendedPrincipal of the user you previously created.

DataSet ds = ResponseTemplateManager.GetAvailableTemplatesAndFo lders(
CurrentPrincipal,
null,
-1,
-1,
null,
null,
null,
false,
new string[] { "Form.Edit", "FormFolder.Read" },
out itemCount);

Lastly what are the permissions of your other surveys? A user does not need to be on a survey's ACL in order to have access to it. If the survey security is set to Public or the Default Policy contains the "Take Survey" permission the survey is available to all respondents.

Last edited by pwiesner; 08-13-2008 at 04:29 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 04:19 PM.


SEO by vBSEO 3.2.0