Saturday, June 16, 2012

Re: Implementing privacy policy

@stork .. thanks for the help.. 
Though it solves only half of my problem.  The "searchable table is what can have almost custom view for each other user. 

For eg. user1 can set view criteria in advance that if some user with some particular attributes (say name : Robert and location :new York ,which if supposedly matches with  user2 ) and if user2 tries searching him, then user 2can view my name and email address , but not my location.

If my example is still not clear , i will try to summaries it as that user X can set for each other user individually, that what they will be able to view of him. This could had been achieved by  creating groups, but we need for flexibility in our case.



On Friday, June 15, 2012 4:52:32 PM UTC+5:30, stork wrote:
Basically, you're talking about user profiles and caching, aren't you?

So associations User hasOne Profile, Profile belongsTo User, and your visibility/etc attributes in profiles table.
Set up cache configuration for it http://book.cakephp.org/2.0/en/core-libraries/caching.html (or use 'default') and fill up (for example) visible profile/users ids in some cached key/record - note, don't use filesystem based caching in production. Then, in model Profile::afterSave() and afterDelete() callbacks alter/clear cached info of that particular user and that's it.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate