You are viewing limited content. For full access, please sign in.

Question

Question

Change document owner with code?

SDK
asked on December 8, 2014

Is this possible. It looks like it used to be, but now DocumentInfo.Owner is readonly. I'm not even positive I need this functionality. I'm just going through old code and converting methods from LFSO to RA, and there is one that changes a documents owner.

0 0

Answer

SELECTED ANSWER
replied on December 8, 2014

You can write to the property EntryInfo.OwnerSid in order to change the owner.

0 0
replied on December 9, 2014 Show version history

EDIT: Nevermind. Thanks!

TrusteeInfo ti = Trustee.GetInfo(newOwner, LFSession);
ei.OwnerSid = ti.Sid;
ei.Lock(LockType.Exclusive);
ei.Save();
ei.Unlock();

 

Type that needs to be set?

ei.OwnerSid = SecurityIdentifier.?

ei.OwnerSid = (SecurityIdentifier)TrusteeInfo?
0 0

Replies

You are not allowed to reply in this post.
replied on December 9, 2014

Type that needs to be set?

ei.OwnerSid = SecurityIdentifier.?

ei.OwnerSid = (SecurityIdentifier)TrusteeInfo?

 

You are not allowed to follow up in this post.

Sign in to reply to this post.