Hello,
I am trying to answer two questions with the LAPI.
1. Return all user and groups that a given username belongs to
This is accomplished with ListRights
2. Return all user and groups that have "see contents" permissions on a given object (document/project/folder)
It would seem that GetObjectRights would be the ticket.
But alas,
Doesn't seem to do it.
Does anybody have any other ideas on how to answer question number 2 with the LAPI?
Any assistance or information pointing me in the right direction would be greatly appreciated.
Thanks in advance.
I am trying to answer two questions with the LAPI.
1. Return all user and groups that a given username belongs to
This is accomplished with ListRights
Code:
LAPI_USERS users = new LAPI_USERS(session);
LLValue rights = new LLValue();
int userfound = users.ListRights(LAPI_USERS.USER,"ausername",rights);
2. Return all user and groups that have "see contents" permissions on a given object (document/project/folder)
It would seem that GetObjectRights would be the ticket.
But alas,
Code:
LLSession session = new LLSession(<aserver>, <aport>, <adft>, <ausername>, <apassword>);
LAPI_DOCUMENTS doc = new LAPI_DOCUMENTS(session);
LLValue objectRights = new LLValue();
int status = doc.GetObjectRights(<avolumeid>,<aobjectid>,objectRights);
if (status == 0) {
for (LLNameEnumeration e = objectRights.enumerateNames(); e.hasMoreElements();){
String nm = e.nextName();
System.out.println(nm + " = " + objectRights.toString(nm));
}
}
Doesn't seem to do it.
Does anybody have any other ideas on how to answer question number 2 with the LAPI?
Any assistance or information pointing me in the right direction would be greatly appreciated.
Thanks in advance.