fix: throw generic not-allowed error on groups.join if a non-owner tries to add another user to a group

This commit is contained in:
Julian Lam
2023-04-06 16:10:40 -04:00
parent 18447b06af
commit 0fc9fdd53d
2 changed files with 10 additions and 0 deletions

View File

@@ -121,6 +121,8 @@ groupsAPI.join = async function (caller, data) {
groupName: groupName,
targetUid: data.uid,
});
} else {
throw new Error('[[error:not-allowed]]');
}
};