How to restrict visibility of a group beyond “group members” or “everyone”?
-
16-10-2019 - |
Pergunta
On the group settings page, it looks like membership visibility is limited to either "Group Members" or "Everyone". Is it possible to restrict membership visibility of a group to something other than those two options?
My preference would be to allow visibility of Group A to the members of Group B but I don't know where/how to set this up.
Is this possible?
Solução
It looks like the property that determines who can view the members is a boolean value: SPGroup.OnlyAllowMembersViewMembership, therefore you're not going to be able to set it to other groups or users.
If you really need to allow other groups (but not everyone) to see the members, you will need to write custom code.
Outras dicas
This is in particular annoying, because membership is visible also to unauthenticated (anonymous) users. So the solution would be to restrict visibility to "Group Members" and write custom code for a view by a group like "authenticated users"?