php - Limit records in SonataAdminBundle by user -


i'm building saas application using symfony2, , i'm using sonataadminbundle create crud of common entities (like type of members, languages, etc; common entities users can created , modified administrators).

i want use sonataadminbundle saas entities: entities belongs user, don't know how it... far know, can use event listener add owner information entity when saving, how can limit records user can see?

what want when user logs in he's redirected dashboard. then, when clicks on "members" entities, sees list of his members, shouldn't see member other users.

is behavior possible sonataadmin, or must create own crud functions? if it's possible, can explain (or show tutorial/document) how create behavior?

you can overwrite createquery alter query used list entities: https://github.com/sonata-project/sonataadminbundle/blob/master/admin/admin.php#l1399-l1408

you can create extension if logic need done many admin instances.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -