It would be nice if Profile2 could watch Roster permissions and adapt profile privacy settings accordingly to the requesting user permissions on site. This way we could give the ability to users to have their profile privacy settings BUT allowing instructors to see their profile photos on Roster if the user is enrolled on their sites.
Roster permission information:
The only relevant permissions for Profile2 are:
(1) roster.viewprofile (to display user names as links to show Profile, otherwise shown as text)
(2) roster.viewofficialphoto (to display official photos (despite of user privacy regarding pics?))
Actually, (1) is to be processed by the Roster tool, not the Profile2 tool. However, Since this is handled by org.sakaiproject.profile2.legacy.ProfileManagerImpl, just need to add checks in:
public boolean displayCompleteProfile(Profile profile);
For (2), checks can be added in ProfileLogicImpl
public boolean isUserXProfileImageVisibleByUserY(String userX, ProfilePrivacy profilePrivacy, String userY, boolean friend);
I'm working on a patch for this, will attach here soon.