mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-25 21:39:21 +00:00
Show the list of members of the group, if it is public
This commit is contained in:
parent
0965b0936b
commit
07fc609694
@ -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")
|
||||
|
@ -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: "<i class='fa fa-trash'></i>"
|
||||
});
|
||||
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"){
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user