mirror of
https://github.com/bitwarden/web
synced 2025-12-16 00:03:25 +00:00
Compare commits
3 Commits
csa-2-pass
...
v2.28.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78a7181fe5 | ||
|
|
2914fc2dd5 | ||
|
|
3a248bc838 |
@@ -8,6 +8,7 @@ import { InfiniteScrollModule } from "ngx-infinite-scroll";
|
|||||||
import { JslibModule } from "jslib-angular/jslib.module";
|
import { JslibModule } from "jslib-angular/jslib.module";
|
||||||
|
|
||||||
import { OssRoutingModule } from "src/app/oss-routing.module";
|
import { OssRoutingModule } from "src/app/oss-routing.module";
|
||||||
|
import { OssModule } from "src/app/oss.module";
|
||||||
import { ServicesModule } from "src/app/services/services.module";
|
import { ServicesModule } from "src/app/services/services.module";
|
||||||
import { WildcardRoutingModule } from "src/app/wildcard-routing.module";
|
import { WildcardRoutingModule } from "src/app/wildcard-routing.module";
|
||||||
|
|
||||||
@@ -19,6 +20,7 @@ import { MaximumVaultTimeoutPolicyComponent } from "./policies/maximum-vault-tim
|
|||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
OssModule,
|
||||||
JslibModule,
|
JslibModule,
|
||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
|
|||||||
2
jslib
2
jslib
Submodule jslib updated: dc7efa4970...e595c0548e
7
package-lock.json
generated
7
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@bitwarden/web-vault",
|
"name": "@bitwarden/web-vault",
|
||||||
"version": "2.27.0",
|
"version": "2.28.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@bitwarden/web-vault",
|
"name": "@bitwarden/web-vault",
|
||||||
"version": "2.27.0",
|
"version": "2.28.1",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jslib/angular": {
|
"jslib/angular": {
|
||||||
"name": "@bitwarden/jslib-angular",
|
"name": "@bitwarden/jslib-common",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -113,7 +113,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jslib/common": {
|
"jslib/common": {
|
||||||
"name": "@bitwarden/jslib-common",
|
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@bitwarden/web-vault",
|
"name": "@bitwarden/web-vault",
|
||||||
"version": "2.27.0",
|
"version": "2.28.1",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": "https://github.com/bitwarden/web",
|
"repository": "https://github.com/bitwarden/web",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -171,7 +171,6 @@ import { EmergencyAccessViewComponent } from "./settings/emergency-access-view.c
|
|||||||
import { EmergencyAccessComponent } from "./settings/emergency-access.component";
|
import { EmergencyAccessComponent } from "./settings/emergency-access.component";
|
||||||
import { EmergencyAddEditComponent } from "./settings/emergency-add-edit.component";
|
import { EmergencyAddEditComponent } from "./settings/emergency-add-edit.component";
|
||||||
import { LinkSsoComponent } from "./settings/link-sso.component";
|
import { LinkSsoComponent } from "./settings/link-sso.component";
|
||||||
import { MasterPasswordEnrollmentComponent } from "./settings/master-password-enrollment.component";
|
|
||||||
import { OptionsComponent } from "./settings/options.component";
|
import { OptionsComponent } from "./settings/options.component";
|
||||||
import { OrganizationPlansComponent } from "./settings/organization-plans.component";
|
import { OrganizationPlansComponent } from "./settings/organization-plans.component";
|
||||||
import { OrganizationsComponent } from "./settings/organizations.component";
|
import { OrganizationsComponent } from "./settings/organizations.component";
|
||||||
@@ -336,7 +335,6 @@ registerLocaleData(localeZhTw, "zh-TW");
|
|||||||
LockComponent,
|
LockComponent,
|
||||||
LoginComponent,
|
LoginComponent,
|
||||||
MasterPasswordPolicyComponent,
|
MasterPasswordPolicyComponent,
|
||||||
MasterPasswordEnrollmentComponent,
|
|
||||||
NavbarComponent,
|
NavbarComponent,
|
||||||
NestedCheckboxComponent,
|
NestedCheckboxComponent,
|
||||||
OptionsComponent,
|
OptionsComponent,
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="passwordEnrollment">
|
|
||||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
|
||||||
<form
|
|
||||||
class="modal-content"
|
|
||||||
#form
|
|
||||||
(ngSubmit)="submit()"
|
|
||||||
[appApiAction]="formPromise"
|
|
||||||
ngNativeValidate
|
|
||||||
>
|
|
||||||
<div class="modal-header">
|
|
||||||
<h2 class="modal-title" id="passwordEnrollmentTitle">
|
|
||||||
{{ passwordEnrollmentTitle | i18n }}
|
|
||||||
</h2>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="close"
|
|
||||||
data-dismiss="modal"
|
|
||||||
appA11yTitle="{{ 'close' | i18n }}"
|
|
||||||
>
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<p>{{ passwordEnrollmentDescription | i18n }}</p>
|
|
||||||
<app-verify-master-password [(ngModel)]="masterPassword" ngDefaultControl name="secret">
|
|
||||||
</app-verify-master-password>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" class="btn btn-primary btn-submit">
|
|
||||||
<i class="fa fa-paper-plane" title="{{ 'loading' | i18n }}" aria-hidden="true"></i>
|
|
||||||
<span>{{ "submit" | i18n }}</span>
|
|
||||||
</button>
|
|
||||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">
|
|
||||||
{{ "close" | i18n }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
import { Component, EventEmitter, Output } from "@angular/core";
|
|
||||||
|
|
||||||
import { LogService } from "jslib-common/abstractions/log.service";
|
|
||||||
import { UserVerificationService } from "jslib-common/abstractions/userVerification.service";
|
|
||||||
import { SecretVerificationRequest } from "jslib-common/models/request/secretVerificationRequest";
|
|
||||||
import { Verification } from "jslib-common/types/verification";
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: "master-password-enrollment",
|
|
||||||
templateUrl: "master-password-enrollment.component.html",
|
|
||||||
})
|
|
||||||
export class MasterPasswordEnrollmentComponent {
|
|
||||||
masterPassword: Verification;
|
|
||||||
formPromise: Promise<void | SecretVerificationRequest>;
|
|
||||||
passwordEnrollmentTitle: string;
|
|
||||||
passwordEnrollmentDescription: string;
|
|
||||||
|
|
||||||
@Output()
|
|
||||||
requestBuilt = new EventEmitter<SecretVerificationRequest>();
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
private userVerificationService: UserVerificationService,
|
|
||||||
private logService: LogService
|
|
||||||
) {}
|
|
||||||
|
|
||||||
async submit() {
|
|
||||||
try {
|
|
||||||
this.formPromise = this.userVerificationService
|
|
||||||
.buildRequest(this.masterPassword)
|
|
||||||
.then((request) => this.requestBuilt.emit(request));
|
|
||||||
|
|
||||||
return await this.formPromise;
|
|
||||||
} catch (e) {
|
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -153,4 +153,3 @@
|
|||||||
</table>
|
</table>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-template #confirmMasterPassword></ng-template>
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { Component, Input, OnInit, ViewChild, ViewContainerRef } from "@angular/core";
|
import { Component, Input, OnInit } from "@angular/core";
|
||||||
|
|
||||||
import { ModalService } from "jslib-angular/services/modal.service";
|
|
||||||
import { ApiService } from "jslib-common/abstractions/api.service";
|
import { ApiService } from "jslib-common/abstractions/api.service";
|
||||||
import { CryptoService } from "jslib-common/abstractions/crypto.service";
|
import { CryptoService } from "jslib-common/abstractions/crypto.service";
|
||||||
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
||||||
@@ -15,16 +14,12 @@ import { Organization } from "jslib-common/models/domain/organization";
|
|||||||
import { Policy } from "jslib-common/models/domain/policy";
|
import { Policy } from "jslib-common/models/domain/policy";
|
||||||
import { OrganizationUserResetPasswordEnrollmentRequest } from "jslib-common/models/request/organizationUserResetPasswordEnrollmentRequest";
|
import { OrganizationUserResetPasswordEnrollmentRequest } from "jslib-common/models/request/organizationUserResetPasswordEnrollmentRequest";
|
||||||
|
|
||||||
import { MasterPasswordEnrollmentComponent } from "./master-password-enrollment.component";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-organizations",
|
selector: "app-organizations",
|
||||||
templateUrl: "organizations.component.html",
|
templateUrl: "organizations.component.html",
|
||||||
})
|
})
|
||||||
export class OrganizationsComponent implements OnInit {
|
export class OrganizationsComponent implements OnInit {
|
||||||
@Input() vault = false;
|
@Input() vault = false;
|
||||||
@ViewChild("confirmMasterPassword", { read: ViewContainerRef, static: true })
|
|
||||||
confirmMasterPasswordModalRef: ViewContainerRef;
|
|
||||||
|
|
||||||
organizations: Organization[];
|
organizations: Organization[];
|
||||||
policies: Policy[];
|
policies: Policy[];
|
||||||
@@ -39,8 +34,7 @@ export class OrganizationsComponent implements OnInit {
|
|||||||
private syncService: SyncService,
|
private syncService: SyncService,
|
||||||
private cryptoService: CryptoService,
|
private cryptoService: CryptoService,
|
||||||
private policyService: PolicyService,
|
private policyService: PolicyService,
|
||||||
private logService: LogService,
|
private logService: LogService
|
||||||
private modalService: ModalService
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
@@ -163,14 +157,11 @@ export class OrganizationsComponent implements OnInit {
|
|||||||
// Create request and execute enrollment
|
// Create request and execute enrollment
|
||||||
const request = new OrganizationUserResetPasswordEnrollmentRequest();
|
const request = new OrganizationUserResetPasswordEnrollmentRequest();
|
||||||
request.resetPasswordKey = keyString;
|
request.resetPasswordKey = keyString;
|
||||||
request.masterPasswordHash = await this.getMasterPassword();
|
return this.apiService.putOrganizationUserResetPasswordEnrollment(
|
||||||
const res = this.apiService.putOrganizationUserResetPasswordEnrollment(
|
|
||||||
org.id,
|
org.id,
|
||||||
org.userId,
|
org.userId,
|
||||||
request
|
request
|
||||||
);
|
);
|
||||||
|
|
||||||
return res;
|
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return this.syncService.fullSync(true);
|
return this.syncService.fullSync(true);
|
||||||
@@ -179,7 +170,6 @@ export class OrganizationsComponent implements OnInit {
|
|||||||
// Withdrawal
|
// Withdrawal
|
||||||
const request = new OrganizationUserResetPasswordEnrollmentRequest();
|
const request = new OrganizationUserResetPasswordEnrollmentRequest();
|
||||||
request.resetPasswordKey = keyString;
|
request.resetPasswordKey = keyString;
|
||||||
request.masterPasswordHash = await this.getMasterPassword();
|
|
||||||
this.actionPromise = this.apiService
|
this.actionPromise = this.apiService
|
||||||
.putOrganizationUserResetPasswordEnrollment(org.id, org.userId, request)
|
.putOrganizationUserResetPasswordEnrollment(org.id, org.userId, request)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@@ -195,23 +185,4 @@ export class OrganizationsComponent implements OnInit {
|
|||||||
this.logService.error(e);
|
this.logService.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async getMasterPassword(): Promise<string> {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
(async () => {
|
|
||||||
const [modal] = await this.modalService.openViewRef(
|
|
||||||
MasterPasswordEnrollmentComponent,
|
|
||||||
this.confirmMasterPasswordModalRef,
|
|
||||||
(comp) => {
|
|
||||||
comp.passwordEnrollmentTitle = "passwordResetEnrollment";
|
|
||||||
comp.passwordEnrollmentDescription = "passwordResetEnrollmentDescription";
|
|
||||||
comp.requestBuilt.subscribe((val) => {
|
|
||||||
modal.close();
|
|
||||||
resolve(val.masterPasswordHash);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
})();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4876,11 +4876,5 @@
|
|||||||
},
|
},
|
||||||
"service": {
|
"service": {
|
||||||
"message": "Service"
|
"message": "Service"
|
||||||
},
|
|
||||||
"passwordResetEnrollment" : {
|
|
||||||
"message": "Password Reset Enrollment"
|
|
||||||
},
|
|
||||||
"passwordResetEnrollmentDescription": {
|
|
||||||
"message": "Enter your master password so we can enroll you in password reset"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user