Remove option to delete/create root table database (#236)

This commit is contained in:
Steve Faulkner
2020-09-28 17:03:47 -05:00
committed by GitHub
parent 23c5d2d7e0
commit aa369760ad
4 changed files with 28 additions and 27 deletions

View File

@@ -15,11 +15,10 @@ export async function deleteDatabase(databaseId: string): Promise<void> {
const clearMessage = logConsoleProgress(`Deleting database ${databaseId}`);
try {
if (
window.authType === AuthType.AAD &&
userContext.defaultExperience !== DefaultAccountExperienceType.Table &&
!userContext.useSDKOperations
) {
if (userContext.defaultExperience === DefaultAccountExperienceType.Table) {
throw new Error("Deleting database resources is not allowed for tables accounts");
}
if (window.authType === AuthType.AAD && !userContext.useSDKOperations) {
await deleteDatabaseWithARM(databaseId);
} else {
await client()