public static boolean isSharedGroup(Group group) {
        return SharedGroupVisibility.everybody == group.getSharedWith() || SharedGroupVisibility.usersOfGroups == group.getSharedWith();
    }
Returns true if the specified Group may be included in a user roster. The decision is made
based on the group properties that are configurable through the Admin Console.

@param group the group to check if it may be considered a shared group.
@return true if the specified Group may be included in a user roster.
xmppserver/src/main/java/org/jivesoftware/openfire/roster/RosterManager.java