test: add ldap group test
This commit is contained in:
@@ -61,8 +61,6 @@ async function setName(req, res, next) {
|
||||
async function setMembers(req, res, next) {
|
||||
assert.strictEqual(typeof req.resource, 'object');
|
||||
|
||||
if (req.resource.source === 'ldap') return next(new HttpError(409, 'members of an external group cannot be set'));
|
||||
|
||||
if (!req.body.userIds) return next(new HttpError(404, 'missing or invalid userIds fields'));
|
||||
if (!Array.isArray(req.body.userIds)) return next(new HttpError(404, 'userIds must be an array'));
|
||||
if (req.body.userIds.some((u) => typeof u !== 'string')) return next(new HttpError(400, 'userIds array must contain strings'));
|
||||
|
||||
Reference in New Issue
Block a user