Hi Tim,
Roles might work just as well, not sure. Collections is less heavy for
searching though I thought..
To use your example, I would be thinking of each user having read and write
collection (or role):
X-read
X-write
A-read
A-write
B-read
B-write
C-read
C-write
D-read
D-write
Doc1, 2 and 3 would obviously have X-read and X-write perms/collections.
Doc1 would additionally get A-read, and C-read
Doc2 would additionally get A-read, and D-read
Doc3 would additionally get A-read, B-read, C-read, and D-read
Adding perms or collections to doc both touches the doc, so that doesn’t
help. You could potentially end up touching lots of docs over and over.
Collections does add something though, it give a little extra control over
who can add something to which collection: “To insert or remove a document
from a database, update permission is needed at both the document and
collection levels.” (see Help in Admin interface)
Kind regards,
Geert
*Van:* [email protected] [mailto:
[email protected]] *Namens *Timothy W. Cook
*Verzonden:* woensdag 11 december 2013 13:42
*Aan:* MarkLogic Developer Discussion
*Onderwerp:* Re: [MarkLogic Dev General] Document Level Authorization
(Roles and Users)
On Wed, Dec 11, 2013 at 10:34 AM, Geert Josten <[email protected]>
wrote:
Hi Tim,
Separate collections for each sharing situation might not be necessary.
Just keep read-access and owner-ship separate and clear..
Hmmm, okay. Now I am not sure what you are saying. My use case is that a
user may share read access with several users for several documents. But
not all users will get read access to all documents that are shared. (wow,
that sounds confusing).
Other users = A, B, C, D
User X's Collection:
doc1 - shared with A & C only
doc2 share with A & D only
doc3 shared with A,B,C & D
My thought about collections was that I would need a collection for each
scenario and then run the risk of having to have multiple copies of
documents. :-(
Maybe many roles is a solution?
MLHIM VIP Signup: http://goo.gl/22B0U
============================================
Timothy Cook, MSc +55 21 94711995
MLHIM http://www.mlhim.org
Like Us on FB: https://www.facebook.com/mlhim2
Circle us on G+: http://goo.gl/44EV5
Google Scholar: http://goo.gl/MMZ1o
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general