Fow retrive all documents that a user can access and how can I paginate them I should retrieve with some queries all the ids of the documents that a user can access and then do a CakePHP find('all') with an IN condition on all ids.
Now for me this is very not efficient and if I have thousands of ids it become impossible to do.
I would ask if there is a best practise to do it
Many Thanks
On Friday, 1 February 2013 18:26:23 UTC+1, André Luis wrote:
-- On Friday, 1 February 2013 18:26:23 UTC+1, André Luis wrote:
I am not sure, but i think you can do it with Containable behavior or with joins and conditions
Em quinta-feira, 31 de janeiro de 2013 14h30min37s UTC-2, byqsri escreveu:HiI have these Model :User (User belongsTo Group)Group (Group hasMany User)DocumentI manage permissions to access to documents with ACL (User and Group like Aro and Document like Aco)Now I have two questions :1)How can I retrive all documents that a user can access and how can I paginate them?2)How can I retrive all users that can access to a certainly document and how can I paginate them?I would find best solutions about these questions (i.e. cn the lowest number of not heavy queries)Many Thnaks
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment