diff --git a/assets/js/pages/groups/pages/about.js b/assets/js/pages/groups/pages/about.js index 0594543d..3385cc4a 100644 --- a/assets/js/pages/groups/pages/about.js +++ b/assets/js/pages/groups/pages/about.js @@ -45,7 +45,13 @@ const GroupAboutPage = { title: tr("Visibility"), icon: "fa-eye", value: group.visibility == "secrete" ? tr("Secrete group") : (group.visibility == "open" ? tr("Open group") : tr("Private group")) - } + }, + + { + title: tr("Members list"), + icon: "fa-eye", + value: group.is_members_list_public ? tr("Public") : tr("Private") + }, ]; if (group.description && group.description != null && group.description != "" && group.description != "null") diff --git a/assets/js/pages/groups/pages/members.js b/assets/js/pages/groups/pages/members.js index f6a003c7..313ae928 100644 --- a/assets/js/pages/groups/pages/members.js +++ b/assets/js/pages/groups/pages/members.js @@ -49,7 +49,8 @@ const GroupMembersPage = { * Load the page components */ var loadComponents = () => { - GroupMembersPage.addInviteForm(info, inviteFormTarget, inviteFormCallback); + if (info.membership != "member") + GroupMembersPage.addInviteForm(info, inviteFormTarget, inviteFormCallback); GroupMembersPage.refreshMembersList(info.id, info, membersList); } @@ -215,7 +216,7 @@ const GroupMembersPage = { /** * Display a single membership information * - * @param {Object} info Information about the group + * @param {AdvancedGroupInfo} info Information about the group * @param {Object} member Information about the membership * @param {Object} users The list of users of the group * @param {HTMLElement} target The target for the list @@ -260,7 +261,7 @@ const GroupMembersPage = { class: "delete-link", innerHTML: "" }); - if(userID() != userInfo.userID){ + if(userID() != userInfo.userID && info.membership != "member"){ deleteUserButton.addEventListener("click", function(e){ @@ -314,6 +315,11 @@ const GroupMembersPage = { }); add_space(memberContainer); + if (info.membership == "member") { + membershipLevelButton.disabled = true; + return; + } + //Check if the user is pending if(member.level == "pending"){ diff --git a/assets/js/pages/groups/sections/tabs.js b/assets/js/pages/groups/sections/tabs.js index c5930f64..13995cbd 100644 --- a/assets/js/pages/groups/sections/tabs.js +++ b/assets/js/pages/groups/sections/tabs.js @@ -23,7 +23,7 @@ const GroupTabs = { data: () => { return { isAdmin: group.membership == "administrator", - canSeeMembers: group.membership == "administrator" || group.membership == "moderator", + canSeeMembers: group.is_members_list_public || group.membership == "administrator" || group.membership == "moderator", activePage: activePage } },