I'd keep this in a custom repository (not a doctrine repository):

$mySpecialRepo->gimme('obj1_id'); // considers ACL and returns or throws
depending on case

I wouldn't try to mix the ACL problem with the persistence problem. I tried
that in the past and it had horrible implications.

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/


On 8 January 2014 13:25, <[email protected]> wrote:

> Hello,
>
> I have some situation..
> If there are Obj1 and Obj2 entities and a relationship between Obj1 and
> Obj2 (ex. One-To-One). Each Object has ACL.
> Ex. user X can have access to Obj1, but not to Obj2. If a user X has
> access to Obj1, and a tries to access Obj2 I need to know should I return
> object or throw an ACL exception (or in some way return different object).
> How it can be done in doctrine? Should I implement it in some sort of
> wrapper? If yes, what should I wrap? Do I need to extend doctrine
> relationship classes?
> What are other options?
>
> Edgar
>
> P.S. Sorry for my bad English.
>
> --
> You received this message because you are subscribed to the Google Groups
> "doctrine-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/doctrine-user.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to