FIX: group card not showing if user can't see its members.

FIX: group card not showing if user can’t see its members.

diff --git a/app/assets/javascripts/discourse/app/components/group-card-contents.js b/app/assets/javascripts/discourse/app/components/group-card-contents.js
index c4aafe5..2ff80e5 100644
--- a/app/assets/javascripts/discourse/app/components/group-card-contents.js
+++ b/app/assets/javascripts/discourse/app/components/group-card-contents.js
@@ -56,7 +56,8 @@ export default Component.extend(CardContentsBase, CleansUp, {
         if (!group.flair_url && !group.flair_bg_color) {
           group.set("flair_url", "fa-users");
         }
-        return group.members.length < maxMembersToDisplay
+        return group.can_see_members &&
+          group.members.length < maxMembersToDisplay
           ? group.findMembers({ limit: maxMembersToDisplay }, true)
           : Promise.resolve();
       })

GitHub sha: 058bf56b

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/no-group-popup-without-viewing-members-permission/150964/5