Skip to content

Commit

Permalink
Adding AUTH0_ALLOW_DELETE condition before deleting the scim_configur…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
nandan-bhat committed Jul 16, 2024
1 parent 8ce7ab4 commit 92347d0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/tools/auth0/handlers/scimHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,12 @@ export default class ScimHandler {
if (scimBodyParams) {
await this.updateScimConfiguration(requestParams, scimBodyParams);
} else {
await this.deleteScimConfiguration(requestParams);
if (this.config('AUTH0_ALLOW_DELETE')) {
log.warn(`Deleting scim_configuration on connection ${ requestParams.id }.`);
await this.deleteScimConfiguration(requestParams);
} else {
log.debug('Skipping DELETE scim_configuration. Enable deletes by setting AUTH0_ALLOW_DELETE to true in your config.');
}
}
} else if (scimBodyParams) {
await this.createScimConfiguration(requestParams, scimBodyParams);
Expand Down

0 comments on commit 92347d0

Please sign in to comment.