That sound's like you've got a tree (or several trees), and it looks like:
ROOT-NODE
/|\
(layer1)A1 A2A3
/ \| |
(layer2) B1 B2 B3B4
/ \
(layer3) C1 C2
Something like this?
Now you can of cours
I've now written parts of the query, but I can't get a few things working.
It's basically this:
IF(
MATCH
(u:User {name:'U1'})-[r:HAS_PERMISSION]->(o:Object {name:'O1'
})
RETURN r.READ
) ELSE IF (
MATCH
(u:User {name:'U1'}),
(o:Obje
So... here is the Graph
Gist: http://gist.neo4j.org/?github-benneq%2Fgists%2F%2Fmeta%2FSimple.adoc
And the PDF (from the previous
post): http://www.docdroid.net/er3w/acl-cheat-sheet.pdf.html
*The permission resolution algorithm:*
1. Look if the User has a direct Permission relation to the Ob
Thanks for your answer. I'll try to clarify things a bit.
First I created an ACL CHEAT
SHEET: http://www.docdroid.net/er3w/acl-cheat-sheet.pdf.html
There you can see lot's of different scenarios. The "*= +r*" and "*= -r*"
behind the Obj-Nodes show what's the resulting permission for this Object.
That is a problem in your applications architecture. If you use MySQL and
have a on-to-many relation between A and B, and now you need to store an
entity C between A and B, you've got to alter the schema and run an update
on all entries.
(if you can tell us a solution that works in SQL, than the
I now decided to use Neo4j as my main DB, this will simplify ACL stuff very
much.
So here's my basic schema:
node User {
String username
}
node Role {
String name
}
relationship MEMBER_OF { }
relationship PARENT_OF { }
relationship HAS_PERMISSION {
boolean read
boolean update
boolea
There are no object types in Neo4j.
There are basically 4 solutions for your problem:
1. search ALL nodes for property p = value (this will find ALL nodes
which have a property named "p" with value "value")
2. use Labels. This way you can "tag" nodes. Each node can have multiple
lab
Hi,
I'm writing a rather complex application, which stores its main data in
MySQL and MongoDB.
Now it's time for authorization, which should be ACL driven. And I'm
looking for your advice whether to use Neo4j (within a Java/Spring
environment) or not, and if yes, how to design the graph.
*In