Closed nsarupr closed 3 months ago
When updating a Users / Group / ServicePlan using the PUT SCIM Url, once the update is done, and we are trying to fetch the resource by ID, the library always fetches users.
This always ends up throwing 404 Users not found error.
https://github.com/jelhub/scimgateway/blob/28026b7b4800adf384f9dfeedc820d8147a6582e/lib/scimgateway.js#L1688C1-L1705C5
router.put([`/(|scim/)(!${undefined}|Users|Groups|servicePlans)/:id`, `/:baseEntity/(|scim/)(!${undefined}|Users|Groups|servicePlans)/:id`], async (ctx) => { if (config.stream.publisher.enabled) { const streamObj = { handle: 'replaceUsrGrp', baseEntity: ctx.params.baseEntity, id: ctx.params.id, obj: ctx.request.body, ctxCopy: ctx.ctxCopy } logger.debug(`${gwName}[${pluginName}] publishing replaceUsrGrp to SCIM Stream and awaiting result`) await this.publish(streamObj) } else { await replaceUsrGrp(ctx) } ctx.request.originalUrl = ctx.params.baseEntity ? `/${ctx.params.baseEntity}/Users/${ctx.params.id}` : `/Users/${ctx.params.id}` return await getById(ctx) })
@jelhub can you please take a look into this?
Now fixed in v4.5.5 Thanks
When updating a Users / Group / ServicePlan using the PUT SCIM Url, once the update is done, and we are trying to fetch the resource by ID, the library always fetches users.
This always ends up throwing 404 Users not found error.
https://github.com/jelhub/scimgateway/blob/28026b7b4800adf384f9dfeedc820d8147a6582e/lib/scimgateway.js#L1688C1-L1705C5