How best to model Application Roles and Permission


(Stevenson Cunanan) #1

Hi I want to create a way to specify roles and permission for an application.ie the api of my application.
I was wondering how to model it.

I was thinking something as simple as
(:User)-[:HAS_ROLE]->(:Role)
(:Role)-[:HAS_PERMISSION]->(:FEATURE)
taking to consideration:https://neo4j.com/docs/2.1.5/examples-acl-structures-in-graphs.html

Please advice.

Best Regards,
Stevenson Lee


(Bratanic Tomaz) #2

Hi Lee,

If this model captures all the scenarios of your application then it looks great. Keeping it simple is the way to go IMO.

If you will run into more complex structures of identity management then I suggest you check more resources:


(Stevenson Cunanan) #3

Hi thanks for the comment.
After thinking some more.
What would be the problems of just using labels as roles?

Best Regards,
Stevenson Lee