From 45e9ca43fe4ad0a3fed2ffc6044d6f8dec4147a2 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Tue, 24 Mar 2020 18:49:09 +0100 Subject: [PATCH] Fix bad check in invation route --- src/controllers/GroupsController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/GroupsController.ts b/src/controllers/GroupsController.ts index 7d92280..99dfd15 100644 --- a/src/controllers/GroupsController.ts +++ b/src/controllers/GroupsController.ts @@ -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);