externalldap: set group members as a single transaction

This commit is contained in:
Girish Ramakrishnan
2024-01-19 17:24:35 +01:00
parent f43a601e86
commit 06ce351d82
2 changed files with 18 additions and 16 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ async function update(req, res, next) {
async function setMembers(req, res, next) {
assert.strictEqual(typeof req.params.groupId, 'string');
if (req.resource.source === 'ldap') return next(new HttpError(409, 'external group members cannot be set'));
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'));