mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 19:21:04 +01:00
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:
@@ -121,6 +121,8 @@ groupsAPI.join = async function (caller, data) {
|
||||
groupName: groupName,
|
||||
targetUid: data.uid,
|
||||
});
|
||||
} else {
|
||||
throw new Error('[[error:not-allowed]]');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user