PHP Automation Client and ACL

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?

0 votes

2 answers

2445 views

ANSWER

Hi Pierre,

Thank you for your reply. After modifying the code according you your suggestion as below…

<?php

$x="local";

…. rest of the code as it is …. print_r($x); //string 'local' is returned ?>

And if I set $x="inherited" then it returns string inherited. but doesnt really tell me who owns Write permission on the given object.

I need to know who has write permission on given object.

If you have any solution, please let me know.

Thanks again,

Megha

10/20/2011



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.

1 votes



Hello,

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

Good Luck for developpement Pierre

0 votes