User profile, managing the display of profile fields.
The question is as follows. There are site users. Using the Profile2 module, I create profiles for users. Using the User Relationships module, I create a relationship type called friend. Now site users can add each other as friends. Each user can view the profile fields of other users. It is necessary to make it so that any user can configure access to view their own profile fields depending on who is viewing their profile.
For example, a user's profile has fields: 1, 2, 3, 4, 5.
After configuration, fields 1, 2, 3 are available to everyone for viewing. Fields 4 and 5 are available for viewing only to friends.
Writing PHP code is not allowed.
Only modules from drupal.org can be used.
Please advise those who know where to look and which modules can be used.
Thank you.