Results 1 to 2 of 2
-
08-12-2008, 02:53 PM #1smuschelli Guest
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
-
08-13-2008, 04:26 PM #2
Administrator
- Join Date
- Mar 2007
- Posts
- 385
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.


LinkBack URL
About LinkBacks
Reply With Quote