I'm trying to find the best way to handle a "complex" security / privacy system using Symfony2.
I read a lot of documentation about the ROLES
and the ACLs
but I'm looking for something different.
I need the rights to be calculated based on the properties of the objects.
In my case, I have a User
object and multiple other objects (Project
, Task
, Label
, and more...).
I need to check if a User
can read or write any kind of object without storing the rights in the database (like the ACL
system is doing). The rights should be "calculated" based on the relation between the User
and a given object.
For example, the User(1)
can write on the Task(2)
because he is a member of the Project(3)
and the Task(2)
is in the Project(3)
.
The Roles of the security service can't handle that. The ACL could handle it but I don't want to store the rights in my database because I know that they are going to change a lot during the life of the product.
Is there a known good practice for that kind of needs or should I write my own system?
Thanks.