Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access personal workspace 1

Status
Not open for further replies.

LLProstarter

Technical User
Mar 11, 2006
4
DE
Hi!

How can I access the personal workspace of other persons to find out the volume and parentid. My target is to place a document in this directory.




LAPI_USERS user = new LAPI_USERS(session);
LLValue pwsInfo = ( new LLValue() ).setAssocNotSet();
LLValue objInfo = ( new LLValue() ).setAssocNotSet();

//////////////////////////////////////////////////////////////////////
//Code to Update a User's Info
//////////////////////////////////////////////////////////////////////

//Define the user's login name
String userName = "test";




//Load the user's info
LLValue attributes = (new LLValue()).setAssocNotSet();
if (user.GetUserInfo(userName, attributes) == 0)
{
documents = new LAPI_DOCUMENTS( session );
status = documents.AccessPersonalWS( pwsInfo );

if ( status == 0 )
{
Console.WriteLine( "Accessed Personal Workspace" );
parentVol = pwsInfo.toInteger( "VolumeID" );
Console.WriteLine("Id = " + parentVol);
parentID = pwsInfo.toInteger( "ID" );
Console.WriteLine("Id = " + parentID);
}

//1 Zeile ID holen
int test = attributes.toInteger("ID");
Console.WriteLine("Id = " + test);
Console.WriteLine("Id = " + attributes.toString("ID"));
Console.WriteLine("Name = " + attributes.toString("Name"));
Console.WriteLine("FirstName = " + attributes.toString("FirstName"));
Console.WriteLine("LastName = " + attributes.toString("LastName"));


Can Someone post a example, please.

Thank you for any advice.

Regards

Christian
 
By design you can't, as the PW is specific to each user, so you can only acces your own PW. A user can grant access for you to see the whole/part of their PW, and if you are using an Admin a/c in which case you could browse to the folders.
 
You meant, if I open a session as Admin I can browse to the PW of other persons and get there IDs.

How can I do this. How can I select there id´s.

Or I missunderstood that?
 
Try creating a new session (another one in your code) with the user of the PW you want to access or like ggriffit said, with an admin account.
 
In 9.5 or I don't know which versions above
Code:
LL_SessionImpersonateUser

This function lets the Admin user impersonate (assume the identity and rights) of another user for the duration of the session.

C++ Function Prototype

LLSTATUS       LL_SessionImpersonateUser (
                     LLSESSION       session, 
                     LLCSTR          impersonateUser ); 
Visual Basic Prototype

Long           LL_SessionImpersonateUser ( _ 
                     ByVal    session            as Long
                     ByVal    impersonateUser    as String )
Input Parameter

session the session handle as returned by the LL_SessionAllocEx function  
impersonateUser     the login name of the user to impersonate 

Output Parameters

None

Remarks

You must first log in as Admin before calling LL_SessionImpersonateUser, otherwise an error is returned. To stop impersonating a user, pass an empty string for the LL_SessionImpersonateUser function.


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top