gristlabs_grist-core/stubs/app/server/lib/logins.ts
Paul Fitzpatrick 383b8ffbf0 (core) add a tool for deleting a user
Summary:
This adds a `user:delete` target to the `cli.sh` tool. The desired user will be deleted from our database, from sendgrid, and from cognito.

There is code for scrubbing the user from team sites, but it isn't yet activated, I'm leaving finalizing and writing tests for it for follow-up.

Test Plan: tested manually

Reviewers: dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D3043
2021-09-29 12:08:23 -04:00

10 lines
373 B
TypeScript

import { GristLoginSystem } from 'app/server/lib/GristServer';
import { getMinimalLoginSystem } from 'app/server/lib/MinimalLogin';
import { getSamlLoginSystem } from 'app/server/lib/SamlConfig';
export async function getLoginSystem(): Promise<GristLoginSystem> {
const saml = await getSamlLoginSystem();
if (saml) { return saml; }
return getMinimalLoginSystem();
}