diff --git a/package.json b/package.json index 598389d748..cd340bad58 100755 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "planet", "license": "AGPL-3.0", - "version": "0.14.0", + "version": "0.14.1", "myplanet": { - "latest": "v0.12.37", + "latest": "v0.12.41", "min": "v0.11.60" }, "scripts": { diff --git a/src/app/login/login-form.component.ts b/src/app/login/login-form.component.ts index 5ace8d6207..15d2ff6900 100644 --- a/src/app/login/login-form.component.ts +++ b/src/app/login/login-form.component.ts @@ -141,9 +141,21 @@ export class LoginFormComponent { { withCredentials: true, domain: this.stateService.configuration.parentDomain }); } + checkArchiveStatus(name) { + this.couchService.get('_users/org.couchdb.user:' + name).subscribe((userData) => { + if (userData?.isArchived) { + this.errorHandler($localize`Member ${name} is not registered`)(); + } + }); + return true; + } + login({ name, password }: { name: string, password: string }, isCreate: boolean) { const configuration = this.stateService.configuration; const userId = `org.couchdb.user:${name}`; + if (this.checkArchiveStatus(name)) { + return; + } this.pouchAuthService.login(name, password).pipe( switchMap(() => isCreate ? from(this.router.navigate([ 'users/update/' + name ])) : from(this.reRoute())), switchMap(() => forkJoin(this.pouchService.replicateFromRemoteDBs())),