Tool
Tool

Reputation: 12488

Symfony2: should ACL be applied to child entities aswell?

I have this entity structure:

Apartment -> Floor (one to many)
Floor -> LeaseTerm (one to many)

I'm applying ACL to Apartment entity on persist (owner).

My question is, should i bother applying ACL to Floor and LeaseTerm entites aswell, or should I just use their relation to Apartment to check ownership of LeaseTerm and Floor entities?

My purpose is restricting the user from editing/deleting/viewing other peoples Floors/LeaseTerms.

Edit: I posted a similar question here but haven't gotten real answers.

If the question is unclear let me know - I'll explain further. But I think I covered the main idea.

Upvotes: 1

Views: 306

Answers (1)

Pben
Pben

Reputation: 1101

if all floor and LeaseTerm have the same access of Apartment apply ACL to the topmost entity if not apply ACL to all entity

Upvotes: 1

Related Questions