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

Question

Question

Its possible get properties of right access of a document electronic LF via SDK, etc?

asked on March 7, 2014

 Hi 

Its possible get properties of right access of a document electronic LF via code sdk, repossitoryaccess,

workflow. Only see properties creator file but no a array of values de users with right acces.

Thanks for help. some tip ?

 

Adjunt files. (INo.png)

====================

Hola que tal

Es posible acceder a las propiedades de un documento laserfiche via code. Ya que solamente

veo propiedades relativas a la creación del documento pero no relativo a quienes tienen acceso

al mismo, tal como se muestra en la imagen.

 

Gracias, por la ayuda.

 

INo.png
INo.png (99.91 KB)
0 0

Answer

SELECTED ANSWER
replied on March 12, 2014

See Entry.GetAclDisplayRights in your SDK documentation.

 

Example:

EntryRights ER = Entry.GetAclDisplayRights(100, new AccountReference("SecureUser", mySess), mySess);
Console.WriteLine(ER.ToString()); // displays the list of allowed rights on Entry with ID 100 for the "SecureUser" user.

Or in Workflow:

 

EntryRights er = this.BoundEntryInfo.GetAclDisplayRights(new AccountReference("admin",RASession));
MsgBox(er.ToString());

 

0 0

Replies

replied on March 12, 2014

Thanks Miruna Babatie 

for you help. You code is ok.

 

 

I was checking SDK (LFSO83Lib)

I do not know if it is the best or even correct way. I use C#

Imagine is another alternative. But, I find a method I do not documented in Laserfiche :

get_SecuredDomainAccountsEx(int preloadFlags)

method of LFDatabase.

 

What is preloadFlags? 

I use preloadFlags=1, I was lucky , work fine, but could be 0, 1, etc.

 

Code C# :

 

// Documento de entrada
ILFEntry documento = (ILFEntry)baseDatos.
GetEntryByPath("...\\documento1");

// Cuenta de dominios 
//(Acceden a traves active directory)
// baseDatos=LFDatabase

LFSecuredDomainAccountCollection 
cuentasActiveDirectory = 
baseDatos.get_SecuredDomainAccountsEx(1); 

// Porque 1 ? este metodo no se encuentra documentado.

for (int numero = 1; 
numero <= cuentasActiveDirectory.Count; numero++)

{
  // cuenta de dominio
  LFDomainAccount u = (LFDomainAccount)
  cuentasActiveDirectory.Item[numero];

  // Acceso al documento
  try 
  {	        
	LFEffectiveRights 
        efectivo = (LFEffectiveRights)
        documento.get_EffectiveRightsByName(u.Name);
        string cadenaDerechos= efectivo.RightsString;

  }
  catch (Exception Error)
  {		
        System.Console.WriteLine
        (Error.Message.ToString().Trim());
  }                    
}               

I throught variable cadenaDerechos, I can see rights of document

ADMIN      = RightsString "BrsReaMCnADaDelRenDPgSAnAnnRedWMeCrDCrFRAcWAcCOwSRDFrzEvTCls"

 

 

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

Sign in to reply to this post.