1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-12-27 22:18:52 +00:00

Fix bad check in invation route

This commit is contained in:
Pierre HUBERT 2020-03-24 18:49:09 +01:00
parent 59925dab45
commit 45e9ca43fe

View File

@ -300,7 +300,7 @@ export class GroupsController {
const groupID = await h.postGroupIDWithAccess("group_id", GroupsAccessLevel.MODERATOR_ACCESS);
const userID = await h.postUserId("userID");
if(!await GroupsHelper.GetMembershipLevel(groupID, userID))
if(await GroupsHelper.GetMembershipLevel(groupID, userID) != GroupMembershipLevels.VISITOR)
h.error(401, "The user is not a visitor of the group!");
await GroupsHelper.SendInvitation(groupID, userID);