Based on @bharaththiruveedula's work.
OKay, i must broke html tags during commit. Sorry for that i'll post update later.
@jarekps When you update the code, ping me here to look at it. thanks!
[fix Bug 931359]Adds vouchees info to the profile page
Bug 931359 - added vouched profiles field with privacy support.
@giogiotatidis please look again :)
@jarekps Continuing yesterday's discussion on IRC:
We need to respect vouchee's privacy settings, so that if voucher is public and vouchee is not public we do not display vouchee.
We do the same when we display the voucher on a profile page.
Read how we decide on whether we display voucher or not https://github.com/mozilla/mozillians/blob/master/mozillians/users/models.py#L217
The privacy_vouched_by field doesn't have to do anything with your changes. You can simply ignore it atm because 1) It's about the voucher and not the vouchees 2) It shouldn't be there in the first place
You should do something similar to this https://github.com/mozilla/mozillians/blob/master/mozillians/users/models.py#L239 and you should return a QuerySet with vouchees that we should display on the current privacy_level
if attrname == vouchees:
blah blah blah
This can be complicated so don't hesitate to ask me here or ping me on IRC to discuss this further.
You can go ahead and use the def vouched_profiles(self): method you created (I just noticed that). But instead of checking the vouched_by value, you should be checking whether the vouchee profile has any attribute available in the current privacy level similar to the way we do it here
@jarekps how is this going? Don't hesitate to ping me for help when / if needed. :)
@glogiotatidis sorry, but i'm currently a little to busy to continue work on this patch :( Please feel free to pass this issue for somebody else.
@jarekps :( Thanks for your work. Please come back when you have more time :)
Closing this one for now. I'll post a new complete one next week.
Thanks @jarekps !