Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Switching Users in SharePoints 2003's API

  Asked By: Pamela    Date: Apr 01    Category: Sharepoint    Views: 849

We have this WebPart that uploads content the shared documents library
well as creates a survey for rating the document uploaded. To
the users i have a Form Digest control on the WebPart.

The issue i am facing is that default contributors do not have rights to
create Surveys. What I would like to do is, for the small period that
survey is created, to switch credentials to a user on the SPS 2003 box
has rights only to create lists, then create the list, and end.

Any ideas on how i can achieve this "switching credentials"



5 Answers Found

Answer #1    Answered By: Gabrielle Welch     Answered On: Apr 01

What about hooking into the Doc Lib events and having the workflow run
as user  that has the correct privileges? Every time a new doc is loaded
-> create a survey.

Answer #2    Answered By: Janessa Riggs     Answered On: Apr 01

You could also add permissions to the user  on the fly. Add the ability to
create surveys  and then once the survey  is completed remove that ability from
the user. The only reason I wouldn't go with Darrin's idea is because the
Survey would be created  under a seperate account and then the original poster of
the document  wouldn't have full control  of the survey unless you specifically
add them. I do however agree with the idea of an event sink.

Answer #3    Answered By: Nisha Gadre     Answered On: Apr 01

Good point. When you say that you would add permission and remove when
completed are you meaning after survey  is created  or when it is no long
active as a survey?

Answer #4    Answered By: Chirag Gupte     Answered On: Apr 01

I would just give them permission to create the survey  and once they have done
that remove the permission. Once the survey is created  they will have rights  to
review it and shouldn't need any additional rights.

Answer #5    Answered By: Vivek Patel     Answered On: Apr 01


[DllImport("advapi32.dll", SetLastError=true)]
static extern int LogonUser(String UserName, String Domain, String
Password, int LogonType, int LogonProvider, ref IntPtr Token);

Didn't find what you were looking for? Find more on Switching Users in SharePoints 2003's API Or get search suggestion and latest updates.