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

Question

Question

Set Everyone to Read Only using SDK

SDK
asked on May 14, 2014

Original Post link below.

 

Ege responded

 

If this is for backup purposes, a more elegant method could be to lock the repository and set the Everyone group to read-only using a Laserfiche SDK script. Of course, this method would be possible only if you have the SDK.

 

 

I set out to do this and I am being explicitly told by the compiler that I can not set ReadOnlyAccess equal to "true" for Domain Users.

 

The exact statement is

 

"Operation or command invalid for the requested type of object [ILFDomainAccount]"

 

It does support setting ReadOnlyAccess equal to "true" for an ILFTrustee object.

 

If Everyone is not a Trustee how is it possible to set Everyone to read only using the SDK?

 

Entire Code

 

            ILFDomainAccount everyone = db.LookupDomainAccount("EVERYONE");

            everyone.ReadOnlyAccess = true;

            everyone.Update();

 

https://answers.laserfiche.com/questions/49996/Backup--script-to-take-repository-offline

0 0

Answer

APPROVED ANSWER
replied on May 16, 2014

The ability to set the Everyone group to read only was only added in Laserfiche 9.0.1. You aren't going to be able to do it through earlier versions of LFSO or on earlier versions of the Laserfiche Server.

0 0

Replies

replied on May 14, 2014

I'm not sure what's going on, as it works for me. ReadOnlyAccess is a settable property of the ILFDomainAccount interface. Which version of LFSO are you using?

0 0
replied on May 15, 2014

LFSO80Lib

0 0
replied on May 15, 2014

It only happens when I use an ILFDomainAccount object.

 

0 0
replied on May 15, 2014

I haven't tried LFSO 8.0 but I suggest using a newer version of LFSO. Newer versions of LFSO can connect to older versions of the server.

0 0
replied on May 16, 2014 Show version history

This got me interested, so I started to look into it as well.  What I have found is that the problem (for me) only hits when I try to set the EVERYONE.ReadOnlyAccess = True.  If I set it False, it does not throw an error or if I set it false on other users/groups it does not error.

 

Also note that I tried it with LFSO8.0 and LFSO8.3 with the same results for both.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.