Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I find out the current user permissions has for an object?

Status
Not open for further replies.

daphan

Programmer
Jun 9, 2006
1
EU
Hello,

We need to find out the current user's permissions (SEE, SEECONTENTS...) to a particular object. I tried this method

String query = "subType = " + API_DOCUMENTS.DOCUMENTSUBTYPE;
int intContentId = new Integer(contentId).intValue();
int mysSrchQuery =
doc.ListObjects(entInfo.toInteger ("VolumeID"), objectID, null, query, LAPI_DOCUMENTS.PERM_SEECONTENTS,
llQueryResults);

if (mysSrchQuery == 0)
iCnt = llQueryResults.size();
else
iCnt = 0;

But this does not seem to work. What did I do wrong? Please advise.

Thank you for all your help.

 
I may be wrong but I read that API as give me all the objects that are of DOCUMENTSUBTYPE under this container,and by the way I am interested only in the objects to which I have the "PERMMASK" supplied.

I would think that if you were interested in the permissions applied to each object ,I would do a list objects or traverse it somehow and do a GetObjectRights
for each object.

Don't really know that much about this call.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top