cancel
Showing results for 
Search instead for 
Did you mean: 

PHP Automation Client and ACL

Megha_
Champ on-the-rise
Champ on-the-rise

I was wondering if PHP Automation Client allows ACL requests or not?

I need to know all the users with Write Permission on a document and I used following code but no joy!

<?php

$x="";

$id = "8f488a16-7683-465e-9cce-03016f818622"; //ID of the object

$answer = $session->newRequest('Document.GetUsersAndGroups')
	->set('input', "doc:id")
	->set('params', 'permission', 'Write')
	->set('params', 'variable name', $x)
	->sendRequest();

print_r($answer); //object returned
print_r($x); //nothing is returned
?>

Can anyone please help?

1 ACCEPTED ANSWER

Alain_ESCAFFRE
Star Contributor
Star Contributor

The Get Users And Groups Operation set the users and groups it computed in a context variable: calling it unitary is not what you want, as it will only return, as output, the same document you put in input. If you put "toto" for variable name parameter, then, in another operation that you would use in the same chain, you could refer to the list of users you fetched by using @{Context['toto']}. For instance, you would like to use the operation "Create Task" for which one of the parameters is a variable name in which it will fetch the users to whom the operation should assign the task it creates.

If the automation server doesn't return a serialization of a complete context, we would need to add an operatoin that returns a specific variable of the context, or maybe all the context, ... this has to be discussed.

View answer in original post

3 REPLIES 3

Pierre_Jenicot1
Star Contributor
Star Contributor

Hello,

Your variable $x can have as value 'local' or 'inherited'

Good Luck for developpement Pierre

Megha_
Champ on-the-rise
Champ on-the-rise

Hi Pierre,

Alain_ESCAFFRE
Star Contributor
Star Contributor

The Get Users And Groups Operation set the users and groups it computed in a context variable: calling it unitary is not what you want, as it will only return, as output, the same document you put in input. If you put "toto" for variable name parameter, then, in another operation that you would use in the same chain, you could refer to the list of users you fetched by using @{Context['toto']}. For instance, you would like to use the operation "Create Task" for which one of the parameters is a variable name in which it will fetch the users to whom the operation should assign the task it creates.

If the automation server doesn't return a serialization of a complete context, we would need to add an operatoin that returns a specific variable of the context, or maybe all the context, ... this has to be discussed.