Thanks,

I was not specific. I had read-role and write-role for specific user. The 
default permission is working for user with read and write role and does not 
for user with only read-role. I think I know what to do right now

Thanks again,
Galina

From: [email protected] 
[mailto:[email protected]] On Behalf Of Danny Sokolsky
Sent: Tuesday, March 17, 2009 2:39 PM
To: General Mark Logic Developer Discussion
Subject: RE: [MarkLogic Dev General] Permission on the document level

Hi Galina,

I am guessing you mean *permissions* on the document, not privileges.  
Documents have permissions on them with a role and a capability (read, insert, 
update, or execute).  To read a document, a user needs to have a role 
corresponding to a permission with a read capability.

Users and roles can also have "default permissions" associated with them.   
When a user creates a document without explicitly setting permissions, then the 
default permissions associated with that user are attached to the created 
document.  You can set default permissions for a user or role in the Admin 
Interface pages for the user and role (see "default permissions" towards the 
bottom of those pages).  A user has the union of default permissions for the 
user and all of the roles to which that user belongs.

So one scenario might be to set up default permissions for a role (call it 
"creator" for this example).  The role "creator" might have default permissions 
of "update" and "insert" for the "creator" role, and a default permission of 
"read" for the "reader" role.  Then, give that "creator" role to anyone who 
creates content, and give the "reader" role to anyone who reads the content.  
You can also give the "reader" role to the "creator" role (so users with the 
"creator" role can read the documents they create).

Does that make sense?

-Danny

From: [email protected] 
[mailto:[email protected]] On Behalf Of Pritsker, Galina
Sent: Tuesday, March 17, 2009 11:16 AM
To: [email protected]
Subject: [MarkLogic Dev General] Permission on the document level

Please advise me on the following:
I apply some privileges to all document on the database. Then 2 days later 
number of documents were added. How I can keep the default privileges for the 
particular user? Next time when a new document added to the database user 
automatically will have for example read/write permission and I would not need 
to run the script again to add privileges to the new document

Thanks,
Galina
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to