mirror of
https://github.com/bitwarden/web
synced 2025-12-06 00:03:28 +00:00
Compare commits
45 Commits
v2022.5.1
...
bug/PS-250
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8417770dcd | ||
|
|
9c60151102 | ||
|
|
a37f585a72 | ||
|
|
b2ca1ac651 | ||
|
|
f195aee90c | ||
|
|
22b41df8b9 | ||
|
|
eefcda7e41 | ||
|
|
42cd171685 | ||
|
|
8ef27713f1 | ||
|
|
b882997ee1 | ||
|
|
a4ff1bb8b4 | ||
|
|
323642c2f5 | ||
|
|
57b647bde5 | ||
|
|
681ace4b1b | ||
|
|
58d9ac5ebc | ||
|
|
eab478da0c | ||
|
|
5a78853de5 | ||
|
|
b4ddce1da2 | ||
|
|
6ee47f0057 | ||
|
|
7b55c8ad1a | ||
|
|
30057d2ac4 | ||
|
|
6f7b712bc7 | ||
|
|
45da771404 | ||
|
|
902c620eb6 | ||
|
|
ca35ccbd35 | ||
|
|
85aa4274f3 | ||
|
|
ffb63a1cc7 | ||
|
|
3501be9484 | ||
|
|
5d1522b77a | ||
|
|
be30d47038 | ||
|
|
2eaa29f6f7 | ||
|
|
b299035e05 | ||
|
|
888892b3e7 | ||
|
|
c936c7a9c1 | ||
|
|
f4f3e8c574 | ||
|
|
3367736c7e | ||
|
|
e3e7fce70a | ||
|
|
74bdfe2602 | ||
|
|
9e01d47a3f | ||
|
|
67de7d4bfb | ||
|
|
f5245a280e | ||
|
|
1dc9502676 | ||
|
|
ccf0d64a7b | ||
|
|
dc2078ae58 | ||
|
|
da470ad709 |
23
.github/workflows/release.yml
vendored
23
.github/workflows/release.yml
vendored
@@ -19,8 +19,8 @@ jobs:
|
|||||||
name: Setup
|
name: Setup
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
outputs:
|
outputs:
|
||||||
release_version: ${{ steps.version.outputs.version }}
|
release_version: ${{ steps.version.outputs.package }}
|
||||||
tag_version: ${{ steps.version.outputs.version }}
|
tag_version: ${{ steps.version.outputs.tag }}
|
||||||
branch_name: ${{ steps.branch.outputs.branch_name }}
|
branch_name: ${{ steps.branch.outputs.branch_name }}
|
||||||
steps:
|
steps:
|
||||||
- name: Branch check
|
- name: Branch check
|
||||||
@@ -38,11 +38,20 @@ jobs:
|
|||||||
|
|
||||||
- name: Check Release Version
|
- name: Check Release Version
|
||||||
id: version
|
id: version
|
||||||
uses: bitwarden/gh-actions/release-version-check@ea9fab01d76940267b4147cc1c4542431246b9f6
|
run: |
|
||||||
with:
|
version=$( jq -r ".version" package.json)
|
||||||
release-type: ${{ github.event.inputs.release_type }}
|
previous_release_tag_version=$(
|
||||||
project-type: ts
|
curl -sL https://api.github.com/repos/$GITHUB_REPOSITORY/releases/latest | jq -r ".tag_name"
|
||||||
file: package.json
|
)
|
||||||
|
|
||||||
|
if [ "v$version" == "$previous_release_tag_version" ] && \
|
||||||
|
[ "${{ github.event.inputs.release_type }}" == "Initial Release" ]; then
|
||||||
|
echo "[!] Already released v$version. Please bump version to continue"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "::set-output name=package::$version"
|
||||||
|
echo "::set-output name=tag::v$version"
|
||||||
|
|
||||||
- name: Get branch name
|
- name: Get branch name
|
||||||
id: branch
|
id: branch
|
||||||
|
|||||||
2
jslib
2
jslib
Submodule jslib updated: 6f117b9901...a6fe5c7900
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@bitwarden/web-vault",
|
"name": "@bitwarden/web-vault",
|
||||||
"version": "2022.5.1",
|
"version": "2.28.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@bitwarden/web-vault",
|
"name": "@bitwarden/web-vault",
|
||||||
"version": "2022.5.1",
|
"version": "2.28.1",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@bitwarden/web-vault",
|
"name": "@bitwarden/web-vault",
|
||||||
"version": "2022.5.1",
|
"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": {
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
<div [ngClass]="{ 'col-5': layout, 'col-12': !layout }">
|
<div [ngClass]="{ 'col-5': layout, 'col-12': !layout }">
|
||||||
<div class="row justify-content-md-center mt-5">
|
<div class="row justify-content-md-center mt-5">
|
||||||
<div [ngClass]="{ 'col-5': !layout, 'col-12': layout }">
|
<div [ngClass]="{ 'col-5': !layout, 'col-12': layout }">
|
||||||
<p class="lead text-center mb-4" *ngIf="!layout">{{ "createAccount" | i18n }}</p>
|
<h1 class="lead text-center mb-4" *ngIf="!layout">{{ "createAccount" | i18n }}</h1>
|
||||||
<div class="card d-block">
|
<div class="card d-block">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<app-callout
|
<app-callout
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="container footer text-muted">
|
<div class="container footer text-muted">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">© {{ year }}, Bitwarden Inc.</div>
|
<div class="col">© {{ year }} Bitwarden Inc.</div>
|
||||||
<div class="col text-center"></div>
|
<div class="col text-center"></div>
|
||||||
<div class="col text-right">
|
<div class="col text-right">
|
||||||
{{ "versionNumber" | i18n: version }}
|
{{ "versionNumber" | i18n: version }}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
<div class="container my-5 text-muted text-center">
|
<div class="container my-5 text-muted text-center">
|
||||||
© {{ year }}, Bitwarden Inc. <br />
|
© {{ year }} Bitwarden Inc. <br />
|
||||||
{{ "versionNumber" | i18n: version }}
|
{{ "versionNumber" | i18n: version }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ import { BulkStatusComponent as OrgBulkStatusComponent } from "../organizations/
|
|||||||
import { CollectionAddEditComponent as OrgCollectionAddEditComponent } from "../organizations/manage/collection-add-edit.component";
|
import { CollectionAddEditComponent as OrgCollectionAddEditComponent } from "../organizations/manage/collection-add-edit.component";
|
||||||
import { CollectionsComponent as OrgManageCollectionsComponent } from "../organizations/manage/collections.component";
|
import { CollectionsComponent as OrgManageCollectionsComponent } from "../organizations/manage/collections.component";
|
||||||
import { EntityEventsComponent as OrgEntityEventsComponent } from "../organizations/manage/entity-events.component";
|
import { EntityEventsComponent as OrgEntityEventsComponent } from "../organizations/manage/entity-events.component";
|
||||||
import { EntityUsersComponent as OrgEntityUsersComponent } from "../organizations/manage/entity-users.component";
|
|
||||||
import { EventsComponent as OrgEventsComponent } from "../organizations/manage/events.component";
|
import { EventsComponent as OrgEventsComponent } from "../organizations/manage/events.component";
|
||||||
import { GroupAddEditComponent as OrgGroupAddEditComponent } from "../organizations/manage/group-add-edit.component";
|
import { GroupAddEditComponent as OrgGroupAddEditComponent } from "../organizations/manage/group-add-edit.component";
|
||||||
import { GroupsComponent as OrgGroupsComponent } from "../organizations/manage/groups.component";
|
import { GroupsComponent as OrgGroupsComponent } from "../organizations/manage/groups.component";
|
||||||
@@ -243,7 +242,6 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga
|
|||||||
OrgCollectionAddEditComponent,
|
OrgCollectionAddEditComponent,
|
||||||
OrgCollectionsComponent,
|
OrgCollectionsComponent,
|
||||||
OrgEntityEventsComponent,
|
OrgEntityEventsComponent,
|
||||||
OrgEntityUsersComponent,
|
|
||||||
OrgEventsComponent,
|
OrgEventsComponent,
|
||||||
OrgExportComponent,
|
OrgExportComponent,
|
||||||
OrgExposedPasswordsReportComponent,
|
OrgExposedPasswordsReportComponent,
|
||||||
@@ -403,7 +401,6 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga
|
|||||||
OrgCollectionAddEditComponent,
|
OrgCollectionAddEditComponent,
|
||||||
OrgCollectionsComponent,
|
OrgCollectionsComponent,
|
||||||
OrgEntityEventsComponent,
|
OrgEntityEventsComponent,
|
||||||
OrgEntityUsersComponent,
|
|
||||||
OrgEventsComponent,
|
OrgEventsComponent,
|
||||||
OrgExportComponent,
|
OrgExportComponent,
|
||||||
OrgExposedPasswordsReportComponent,
|
OrgExposedPasswordsReportComponent,
|
||||||
|
|||||||
@@ -29,52 +29,52 @@
|
|||||||
></i>
|
></i>
|
||||||
<span class="sr-only">{{ "loading" | i18n }}</span>
|
<span class="sr-only">{{ "loading" | i18n }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<cdk-virtual-scroll-viewport
|
||||||
class="modal-body"
|
itemSize="46"
|
||||||
*ngIf="
|
minBufferPx="600"
|
||||||
!loading && users && (users | search: searchText:'name':'email':'id') as searchedUsers
|
maxBufferPx="1200"
|
||||||
"
|
[style]="scrollViewportStyle"
|
||||||
>
|
>
|
||||||
<div class="d-flex">
|
<div class="modal-body" *ngIf="!loading && users && searchedUsers">
|
||||||
<div class="mr-3">
|
<div class="d-flex">
|
||||||
<label class="sr-only" for="search">{{ "search" | i18n }}</label>
|
<div class="mr-3">
|
||||||
<input
|
<label class="sr-only" for="search">{{ "search" | i18n }}</label>
|
||||||
type="search"
|
<input
|
||||||
class="form-control form-control-sm"
|
type="search"
|
||||||
id="search"
|
class="form-control form-control-sm"
|
||||||
placeholder="{{ 'search' | i18n }}"
|
id="search"
|
||||||
name="SearchText"
|
placeholder="{{ 'search' | i18n }}"
|
||||||
[(ngModel)]="searchText"
|
name="SearchText"
|
||||||
/>
|
[(ngModel)]="searchText"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="btn-group btn-group-sm" role="group">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn btn-outline-secondary"
|
||||||
|
[ngClass]="{ active: !showSelected }"
|
||||||
|
(click)="filterSelected(false)"
|
||||||
|
>
|
||||||
|
{{ "all" | i18n }}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn btn-outline-secondary"
|
||||||
|
[ngClass]="{ active: showSelected }"
|
||||||
|
(click)="filterSelected(true)"
|
||||||
|
>
|
||||||
|
{{ "selected" | i18n }}
|
||||||
|
<span class="badge badge-pill badge-info" *ngIf="selectedCount">{{
|
||||||
|
selectedCount
|
||||||
|
}}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group btn-group-sm" role="group">
|
<ng-container *ngIf="!searchedUsers.length">
|
||||||
<button
|
<hr />
|
||||||
type="button"
|
{{ "noUsersInList" | i18n }}
|
||||||
class="btn btn-outline-secondary"
|
</ng-container>
|
||||||
[ngClass]="{ active: !showSelected }"
|
<table class="table table-hover table-list mb-0" [hidden]="!searchedUsers.length">
|
||||||
(click)="filterSelected(false)"
|
|
||||||
>
|
|
||||||
{{ "all" | i18n }}
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-outline-secondary"
|
|
||||||
[ngClass]="{ active: showSelected }"
|
|
||||||
(click)="filterSelected(true)"
|
|
||||||
>
|
|
||||||
{{ "selected" | i18n }}
|
|
||||||
<span class="badge badge-pill badge-info" *ngIf="selectedCount">{{
|
|
||||||
selectedCount
|
|
||||||
}}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<ng-container *ngIf="!searchedUsers.length">
|
|
||||||
<hr />
|
|
||||||
{{ "noUsersInList" | i18n }}
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngIf="searchedUsers.length">
|
|
||||||
<table class="table table-hover table-list mb-0">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let u of searchedUsers">
|
<tr *cdkVirtualFor="let u of searchedUsers" class="">
|
||||||
<td class="table-list-checkbox" (click)="check(u)">
|
<td class="table-list-checkbox" (click)="check(u)">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
@@ -164,8 +164,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</ng-container>
|
</div>
|
||||||
</div>
|
</cdk-virtual-scroll-viewport>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">
|
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">
|
||||||
<i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true"></i>
|
<i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true"></i>
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
|
import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
|
||||||
|
|
||||||
|
import { SearchPipe } from "jslib-angular/pipes/search.pipe";
|
||||||
import { ApiService } from "jslib-common/abstractions/api.service";
|
import { ApiService } from "jslib-common/abstractions/api.service";
|
||||||
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
||||||
import { LogService } from "jslib-common/abstractions/log.service";
|
import { LogService } from "jslib-common/abstractions/log.service";
|
||||||
@@ -13,6 +14,7 @@ import { OrganizationUserUserDetailsResponse } from "jslib-common/models/respons
|
|||||||
@Component({
|
@Component({
|
||||||
selector: "app-entity-users",
|
selector: "app-entity-users",
|
||||||
templateUrl: "entity-users.component.html",
|
templateUrl: "entity-users.component.html",
|
||||||
|
providers: [SearchPipe],
|
||||||
})
|
})
|
||||||
export class EntityUsersComponent implements OnInit {
|
export class EntityUsersComponent implements OnInit {
|
||||||
@Input() entity: "group" | "collection";
|
@Input() entity: "group" | "collection";
|
||||||
@@ -33,6 +35,7 @@ export class EntityUsersComponent implements OnInit {
|
|||||||
private allUsers: OrganizationUserUserDetailsResponse[] = [];
|
private allUsers: OrganizationUserUserDetailsResponse[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
private search: SearchPipe,
|
||||||
private apiService: ApiService,
|
private apiService: ApiService,
|
||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private platformUtilsService: PlatformUtilsService,
|
private platformUtilsService: PlatformUtilsService,
|
||||||
@@ -52,6 +55,14 @@ export class EntityUsersComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get searchedUsers() {
|
||||||
|
return this.search.transform(this.users, this.searchText, "name", "email", "id");
|
||||||
|
}
|
||||||
|
|
||||||
|
get scrollViewportStyle() {
|
||||||
|
return `min-height: 120px; height: ${120 + this.searchedUsers.length * 46}px`;
|
||||||
|
}
|
||||||
|
|
||||||
async loadUsers() {
|
async loadUsers() {
|
||||||
const users = await this.apiService.getOrganizationUsers(this.organizationId);
|
const users = await this.apiService.getOrganizationUsers(this.organizationId);
|
||||||
this.allUsers = users.data.map((r) => r).sort(Utils.getSortFunction(this.i18nService, "email"));
|
this.allUsers = users.data.map((r) => r).sort(Utils.getSortFunction(this.i18nService, "email"));
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import { ScrollingModule } from "@angular/cdk/scrolling";
|
||||||
|
import { NgModule } from "@angular/core";
|
||||||
|
|
||||||
|
import { SharedModule } from "../../shared.module";
|
||||||
|
|
||||||
|
import { EntityUsersComponent } from "./entity-users.component";
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [SharedModule, ScrollingModule],
|
||||||
|
declarations: [EntityUsersComponent],
|
||||||
|
exports: [EntityUsersComponent],
|
||||||
|
})
|
||||||
|
export class OrganizationManageModule {}
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
import { Component, Input } from "@angular/core";
|
|
||||||
|
|
||||||
import { Organization } from "jslib-common/models/domain/organization";
|
|
||||||
|
|
||||||
import { VaultFilterComponent } from "./vault-filter.component";
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: "app-organization-vault-filter",
|
|
||||||
templateUrl: "vault-filter.component.html",
|
|
||||||
})
|
|
||||||
export class OrganizationVaultFilterComponent extends VaultFilterComponent {
|
|
||||||
hideOrganizations = true;
|
|
||||||
hideFavorites = true;
|
|
||||||
hideFolders = true;
|
|
||||||
|
|
||||||
organization: Organization;
|
|
||||||
|
|
||||||
async initCollections() {
|
|
||||||
if (this.organization.canEditAnyCollection) {
|
|
||||||
return await this.vaultFilterService.buildAdminCollections(this.organization.id);
|
|
||||||
}
|
|
||||||
return await this.vaultFilterService.buildCollections(this.organization.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
async reloadCollectionsAndFolders() {
|
|
||||||
this.collections = await this.initCollections();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
appAutofocus
|
appAutofocus
|
||||||
/>
|
/>
|
||||||
<app-organization-filter
|
<app-organization-filter
|
||||||
|
*ngIf="showOrgFilter"
|
||||||
[hide]="hideOrganizations"
|
[hide]="hideOrganizations"
|
||||||
[activeFilter]="activeFilter"
|
[activeFilter]="activeFilter"
|
||||||
[collapsedFilterNodes]="collapsedFilterNodes"
|
[collapsedFilterNodes]="collapsedFilterNodes"
|
||||||
@@ -38,7 +39,7 @@
|
|||||||
></app-organization-filter>
|
></app-organization-filter>
|
||||||
<div class="filter">
|
<div class="filter">
|
||||||
<app-status-filter
|
<app-status-filter
|
||||||
[hideFavorites]="hideFavorites"
|
[hideFavorites]="!showFavorites"
|
||||||
[hideTrash]="hideTrash"
|
[hideTrash]="hideTrash"
|
||||||
[activeFilter]="activeFilter"
|
[activeFilter]="activeFilter"
|
||||||
(onFilterChange)="applyFilter($event)"
|
(onFilterChange)="applyFilter($event)"
|
||||||
@@ -54,7 +55,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="filter">
|
<div class="filter">
|
||||||
<app-folder-filter
|
<app-folder-filter
|
||||||
[hide]="hideFolders"
|
[hide]="!showFolders"
|
||||||
[activeFilter]="activeFilter"
|
[activeFilter]="activeFilter"
|
||||||
[collapsedFilterNodes]="collapsedFilterNodes"
|
[collapsedFilterNodes]="collapsedFilterNodes"
|
||||||
[folderNodes]="folders"
|
[folderNodes]="folders"
|
||||||
|
|||||||
@@ -1,22 +1,26 @@
|
|||||||
import { Component, EventEmitter, Output } from "@angular/core";
|
import { Component, EventEmitter, Input, Output } from "@angular/core";
|
||||||
|
|
||||||
import { VaultFilterComponent as BaseVaultFilterComponent } from "jslib-angular/modules/vault-filter/vault-filter.component";
|
import { VaultFilterComponent as BaseVaultFilterComponent } from "jslib-angular/modules/vault-filter/vault-filter.component";
|
||||||
|
import { VaultFilterService } from "jslib-angular/modules/vault-filter/vault-filter.service";
|
||||||
import { VaultFilterService } from "./vault-filter.service";
|
import { Organization } from "jslib-common/models/domain/organization";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-vault-filter",
|
selector: "app-vault-filter",
|
||||||
templateUrl: "vault-filter.component.html",
|
templateUrl: "vault-filter.component.html",
|
||||||
})
|
})
|
||||||
export class VaultFilterComponent extends BaseVaultFilterComponent {
|
export class VaultFilterComponent extends BaseVaultFilterComponent {
|
||||||
|
@Input() showOrgFilter = true;
|
||||||
|
@Input() showFolders = true;
|
||||||
|
@Input() showFavorites = true;
|
||||||
|
|
||||||
@Output() onSearchTextChanged = new EventEmitter<string>();
|
@Output() onSearchTextChanged = new EventEmitter<string>();
|
||||||
|
|
||||||
searchPlaceholder: string;
|
searchPlaceholder: string;
|
||||||
searchText = "";
|
searchText = "";
|
||||||
|
|
||||||
constructor(protected vaultFilterService: VaultFilterService) {
|
organization: Organization;
|
||||||
// This empty constructor is required to provide the web vaultFilterService subclass to super()
|
|
||||||
// TODO: refactor this to use proper dependency injection
|
constructor(vaultFilterService: VaultFilterService) {
|
||||||
super(vaultFilterService);
|
super(vaultFilterService);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24,13 +28,7 @@ export class VaultFilterComponent extends BaseVaultFilterComponent {
|
|||||||
this.onSearchTextChanged.emit(this.searchText);
|
this.onSearchTextChanged.emit(this.searchText);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method exists because the vault component gets its data mixed up during the initial sync on first login. It looks for data before the sync is complete.
|
async initCollections() {
|
||||||
// It should be removed as soon as doing so makes sense.
|
return await this.vaultFilterService.buildCollections(this.organization?.id);
|
||||||
async reloadOrganizations() {
|
|
||||||
this.organizations = await this.vaultFilterService.buildOrganizations();
|
|
||||||
this.activePersonalOwnershipPolicy =
|
|
||||||
await this.vaultFilterService.checkForPersonalOwnershipPolicy();
|
|
||||||
this.activeSingleOrganizationPolicy =
|
|
||||||
await this.vaultFilterService.checkForSingleOrganizationPolicy();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
import { NgModule } from "@angular/core";
|
import { NgModule } from "@angular/core";
|
||||||
|
|
||||||
|
import { VaultFilterService } from "jslib-angular/modules/vault-filter/vault-filter.service";
|
||||||
|
import { CipherService } from "jslib-common/abstractions/cipher.service";
|
||||||
|
import { CollectionService } from "jslib-common/abstractions/collection.service";
|
||||||
|
import { FolderService } from "jslib-common/abstractions/folder.service";
|
||||||
|
import { OrganizationService } from "jslib-common/abstractions/organization.service";
|
||||||
|
import { PolicyService } from "jslib-common/abstractions/policy.service";
|
||||||
|
import { StateService } from "jslib-common/abstractions/state.service";
|
||||||
|
|
||||||
import { SharedModule } from "../shared.module";
|
import { SharedModule } from "../shared.module";
|
||||||
|
|
||||||
import { CollectionFilterComponent } from "./components/collection-filter.component";
|
import { CollectionFilterComponent } from "./components/collection-filter.component";
|
||||||
@@ -9,9 +17,7 @@ import { OrganizationFilterComponent } from "./components/organization-filter.co
|
|||||||
import { OrganizationOptionsComponent } from "./components/organization-options.component";
|
import { OrganizationOptionsComponent } from "./components/organization-options.component";
|
||||||
import { StatusFilterComponent } from "./components/status-filter.component";
|
import { StatusFilterComponent } from "./components/status-filter.component";
|
||||||
import { TypeFilterComponent } from "./components/type-filter.component";
|
import { TypeFilterComponent } from "./components/type-filter.component";
|
||||||
import { OrganizationVaultFilterComponent } from "./organization-vault-filter.component";
|
|
||||||
import { VaultFilterComponent } from "./vault-filter.component";
|
import { VaultFilterComponent } from "./vault-filter.component";
|
||||||
import { VaultFilterService } from "./vault-filter.service";
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [SharedModule],
|
imports: [SharedModule],
|
||||||
@@ -23,10 +29,22 @@ import { VaultFilterService } from "./vault-filter.service";
|
|||||||
OrganizationOptionsComponent,
|
OrganizationOptionsComponent,
|
||||||
StatusFilterComponent,
|
StatusFilterComponent,
|
||||||
TypeFilterComponent,
|
TypeFilterComponent,
|
||||||
OrganizationVaultFilterComponent,
|
|
||||||
LinkSsoComponent,
|
LinkSsoComponent,
|
||||||
],
|
],
|
||||||
exports: [VaultFilterComponent, OrganizationVaultFilterComponent],
|
exports: [VaultFilterComponent],
|
||||||
providers: [VaultFilterService],
|
providers: [
|
||||||
|
{
|
||||||
|
provide: VaultFilterService,
|
||||||
|
useClass: VaultFilterService,
|
||||||
|
deps: [
|
||||||
|
StateService,
|
||||||
|
OrganizationService,
|
||||||
|
FolderService,
|
||||||
|
CipherService,
|
||||||
|
CollectionService,
|
||||||
|
PolicyService,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class VaultFilterModule {}
|
export class VaultFilterModule {}
|
||||||
|
|||||||
@@ -1,54 +1,3 @@
|
|||||||
import { Injectable } from "@angular/core";
|
|
||||||
|
|
||||||
import { DynamicTreeNode } from "jslib-angular/modules/vault-filter/models/dynamic-tree-node.model";
|
|
||||||
import { VaultFilterService as BaseVaultFilterService } from "jslib-angular/modules/vault-filter/vault-filter.service";
|
import { VaultFilterService as BaseVaultFilterService } from "jslib-angular/modules/vault-filter/vault-filter.service";
|
||||||
import { ApiService } from "jslib-common/abstractions/api.service";
|
|
||||||
import { CipherService } from "jslib-common/abstractions/cipher.service";
|
|
||||||
import { CollectionService } from "jslib-common/abstractions/collection.service";
|
|
||||||
import { FolderService } from "jslib-common/abstractions/folder.service";
|
|
||||||
import { OrganizationService } from "jslib-common/abstractions/organization.service";
|
|
||||||
import { PolicyService } from "jslib-common/abstractions/policy.service";
|
|
||||||
import { StateService } from "jslib-common/abstractions/state.service";
|
|
||||||
import { CollectionData } from "jslib-common/models/data/collectionData";
|
|
||||||
import { Collection } from "jslib-common/models/domain/collection";
|
|
||||||
import { CollectionDetailsResponse } from "jslib-common/models/response/collectionResponse";
|
|
||||||
import { CollectionView } from "jslib-common/models/view/collectionView";
|
|
||||||
|
|
||||||
@Injectable()
|
export class VaultFilterService extends BaseVaultFilterService {}
|
||||||
export class VaultFilterService extends BaseVaultFilterService {
|
|
||||||
constructor(
|
|
||||||
stateService: StateService,
|
|
||||||
organizationService: OrganizationService,
|
|
||||||
folderService: FolderService,
|
|
||||||
cipherService: CipherService,
|
|
||||||
collectionService: CollectionService,
|
|
||||||
policyService: PolicyService,
|
|
||||||
protected apiService: ApiService
|
|
||||||
) {
|
|
||||||
super(
|
|
||||||
stateService,
|
|
||||||
organizationService,
|
|
||||||
folderService,
|
|
||||||
cipherService,
|
|
||||||
collectionService,
|
|
||||||
policyService
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
async buildAdminCollections(organizationId: string) {
|
|
||||||
let result: CollectionView[] = [];
|
|
||||||
const collectionResponse = await this.apiService.getCollections(organizationId);
|
|
||||||
if (collectionResponse?.data != null && collectionResponse.data.length) {
|
|
||||||
const collectionDomains = collectionResponse.data.map(
|
|
||||||
(r: CollectionDetailsResponse) => new Collection(new CollectionData(r))
|
|
||||||
);
|
|
||||||
result = await this.collectionService.decryptMany(collectionDomains);
|
|
||||||
}
|
|
||||||
|
|
||||||
const nestedCollections = await this.collectionService.getAllNested(result);
|
|
||||||
return new DynamicTreeNode<CollectionView>({
|
|
||||||
fullList: result,
|
|
||||||
nestedList: nestedCollections,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.se
|
|||||||
import { StateService } from "jslib-common/abstractions/state.service";
|
import { StateService } from "jslib-common/abstractions/state.service";
|
||||||
import { SyncService } from "jslib-common/abstractions/sync.service";
|
import { SyncService } from "jslib-common/abstractions/sync.service";
|
||||||
import { TokenService } from "jslib-common/abstractions/token.service";
|
import { TokenService } from "jslib-common/abstractions/token.service";
|
||||||
import { CipherType } from "jslib-common/enums/cipherType";
|
|
||||||
import { CipherView } from "jslib-common/models/view/cipherView";
|
import { CipherView } from "jslib-common/models/view/cipherView";
|
||||||
|
|
||||||
import { UpdateKeyComponent } from "../../../../settings/update-key.component";
|
import { UpdateKeyComponent } from "../../../../settings/update-key.component";
|
||||||
@@ -58,7 +57,6 @@ export class IndividualVaultComponent implements OnInit, OnDestroy {
|
|||||||
updateKeyModalRef: ViewContainerRef;
|
updateKeyModalRef: ViewContainerRef;
|
||||||
|
|
||||||
favorites = false;
|
favorites = false;
|
||||||
type: CipherType = null;
|
|
||||||
folderId: string = null;
|
folderId: string = null;
|
||||||
collectionId: string = null;
|
collectionId: string = null;
|
||||||
organizationId: string = null;
|
organizationId: string = null;
|
||||||
@@ -327,7 +325,7 @@ export class IndividualVaultComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
async addCipher() {
|
async addCipher() {
|
||||||
const component = await this.editCipher(null);
|
const component = await this.editCipher(null);
|
||||||
component.type = this.type;
|
component.type = this.activeFilter.cipherType;
|
||||||
component.folderId = this.folderId === "none" ? null : this.folderId;
|
component.folderId = this.folderId === "none" ? null : this.folderId;
|
||||||
if (this.activeFilter.selectedCollectionId != null) {
|
if (this.activeFilter.selectedCollectionId != null) {
|
||||||
const collection = this.filterComponent.collections.fullList.filter(
|
const collection = this.filterComponent.collections.fullList.filter(
|
||||||
@@ -399,7 +397,7 @@ export class IndividualVaultComponent implements OnInit, OnDestroy {
|
|||||||
if (queryParams == null) {
|
if (queryParams == null) {
|
||||||
queryParams = {
|
queryParams = {
|
||||||
favorites: this.favorites ? true : null,
|
favorites: this.favorites ? true : null,
|
||||||
type: this.type,
|
type: this.activeFilter.cipherType,
|
||||||
folderId: this.folderId,
|
folderId: this.folderId,
|
||||||
collectionId: this.collectionId,
|
collectionId: this.collectionId,
|
||||||
deleted: this.deleted ? true : null,
|
deleted: this.deleted ? true : null,
|
||||||
|
|||||||
@@ -4,12 +4,15 @@
|
|||||||
<div class="groupings">
|
<div class="groupings">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="inner-content">
|
<div class="inner-content">
|
||||||
<app-organization-vault-filter
|
<app-vault-filter
|
||||||
#vaultFilter
|
#vaultFilter
|
||||||
|
[showFolders]="false"
|
||||||
|
[showFavorites]="false"
|
||||||
[activeFilter]="activeFilter"
|
[activeFilter]="activeFilter"
|
||||||
|
[showOrgFilter]="false"
|
||||||
(onFilterChange)="applyVaultFilter($event)"
|
(onFilterChange)="applyVaultFilter($event)"
|
||||||
(onSearchTextChanged)="filterSearchText($event)"
|
(onSearchTextChanged)="filterSearchText($event)"
|
||||||
></app-organization-vault-filter>
|
></app-vault-filter>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import { AddEditComponent } from "../../../../organizations/vault/add-edit.compo
|
|||||||
import { AttachmentsComponent } from "../../../../organizations/vault/attachments.component";
|
import { AttachmentsComponent } from "../../../../organizations/vault/attachments.component";
|
||||||
import { CiphersComponent } from "../../../../organizations/vault/ciphers.component";
|
import { CiphersComponent } from "../../../../organizations/vault/ciphers.component";
|
||||||
import { CollectionsComponent } from "../../../../organizations/vault/collections.component";
|
import { CollectionsComponent } from "../../../../organizations/vault/collections.component";
|
||||||
import { OrganizationVaultFilterComponent } from "../../../vault-filter/organization-vault-filter.component";
|
import { VaultFilterComponent } from "../../../vault-filter/vault-filter.component";
|
||||||
import { VaultService } from "../../vault.service";
|
import { VaultService } from "../../vault.service";
|
||||||
|
|
||||||
const BroadcasterSubscriptionId = "OrgVaultComponent";
|
const BroadcasterSubscriptionId = "OrgVaultComponent";
|
||||||
@@ -39,8 +39,7 @@ const BroadcasterSubscriptionId = "OrgVaultComponent";
|
|||||||
templateUrl: "organization-vault.component.html",
|
templateUrl: "organization-vault.component.html",
|
||||||
})
|
})
|
||||||
export class OrganizationVaultComponent implements OnInit, OnDestroy {
|
export class OrganizationVaultComponent implements OnInit, OnDestroy {
|
||||||
@ViewChild("vaultFilter", { static: true })
|
@ViewChild("vaultFilter", { static: true }) vaultFilterComponent: VaultFilterComponent;
|
||||||
vaultFilterComponent: OrganizationVaultFilterComponent;
|
|
||||||
@ViewChild(CiphersComponent, { static: true }) ciphersComponent: CiphersComponent;
|
@ViewChild(CiphersComponent, { static: true }) ciphersComponent: CiphersComponent;
|
||||||
@ViewChild("attachments", { read: ViewContainerRef, static: true })
|
@ViewChild("attachments", { read: ViewContainerRef, static: true })
|
||||||
attachmentsModalRef: ViewContainerRef;
|
attachmentsModalRef: ViewContainerRef;
|
||||||
@@ -58,11 +57,6 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
|
|||||||
trashCleanupWarning: string = null;
|
trashCleanupWarning: string = null;
|
||||||
activeFilter: VaultFilter = new VaultFilter();
|
activeFilter: VaultFilter = new VaultFilter();
|
||||||
|
|
||||||
// This is a hack to avoid redundant api calls that fetch OrganizationVaultFilterComponent collections
|
|
||||||
// When it makes sense to do so we should leverage some other communication method for change events that isn't directly tied to the query param for organizationId
|
|
||||||
// i.e. exposing the VaultFiltersService to the OrganizationSwitcherComponent to make relevant updates from a change event instead of just depending on the router
|
|
||||||
firstLoaded = true;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private organizationService: OrganizationService,
|
private organizationService: OrganizationService,
|
||||||
@@ -101,7 +95,11 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
|
|||||||
case "syncCompleted":
|
case "syncCompleted":
|
||||||
if (message.successfully) {
|
if (message.successfully) {
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
this.vaultFilterComponent.reloadCollectionsAndFolders(),
|
this.vaultFilterComponent.reloadCollectionsAndFolders(
|
||||||
|
new VaultFilter({
|
||||||
|
selectedOrganizationId: this.organization.id,
|
||||||
|
} as Partial<VaultFilter>)
|
||||||
|
),
|
||||||
this.ciphersComponent.refresh(),
|
this.ciphersComponent.refresh(),
|
||||||
]);
|
]);
|
||||||
this.changeDetectorRef.detectChanges();
|
this.changeDetectorRef.detectChanges();
|
||||||
@@ -111,12 +109,9 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
await this.vaultFilterComponent.reloadCollectionsAndFolders(
|
||||||
if (!this.firstLoaded) {
|
new VaultFilter({ selectedOrganizationId: this.organization.id } as Partial<VaultFilter>)
|
||||||
await this.vaultFilterComponent.reloadCollectionsAndFolders();
|
);
|
||||||
}
|
|
||||||
this.firstLoaded = false;
|
|
||||||
|
|
||||||
await this.ciphersComponent.reload();
|
await this.ciphersComponent.reload();
|
||||||
|
|
||||||
if (qParams.viewEvents != null) {
|
if (qParams.viewEvents != null) {
|
||||||
|
|||||||
@@ -20,8 +20,9 @@ import {
|
|||||||
import { ListResponse } from "jslib-common/models/response/listResponse";
|
import { ListResponse } from "jslib-common/models/response/listResponse";
|
||||||
import { CollectionView } from "jslib-common/models/view/collectionView";
|
import { CollectionView } from "jslib-common/models/view/collectionView";
|
||||||
|
|
||||||
|
import { EntityUsersComponent } from "../../modules/organizations/manage/entity-users.component";
|
||||||
|
|
||||||
import { CollectionAddEditComponent } from "./collection-add-edit.component";
|
import { CollectionAddEditComponent } from "./collection-add-edit.component";
|
||||||
import { EntityUsersComponent } from "./entity-users.component";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-org-manage-collections",
|
selector: "app-org-manage-collections",
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ import { SearchService } from "jslib-common/abstractions/search.service";
|
|||||||
import { Utils } from "jslib-common/misc/utils";
|
import { Utils } from "jslib-common/misc/utils";
|
||||||
import { GroupResponse } from "jslib-common/models/response/groupResponse";
|
import { GroupResponse } from "jslib-common/models/response/groupResponse";
|
||||||
|
|
||||||
import { EntityUsersComponent } from "./entity-users.component";
|
import { EntityUsersComponent } from "../../modules/organizations/manage/entity-users.component";
|
||||||
|
|
||||||
import { GroupAddEditComponent } from "./group-add-edit.component";
|
import { GroupAddEditComponent } from "./group-add-edit.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { NgModule } from "@angular/core";
|
import { NgModule } from "@angular/core";
|
||||||
|
|
||||||
import { LooseComponentsModule } from "./modules/loose-components.module";
|
import { LooseComponentsModule } from "./modules/loose-components.module";
|
||||||
|
import { OrganizationManageModule } from "./modules/organizations/manage/organization-manage.module";
|
||||||
import { PipesModule } from "./modules/pipes/pipes.module";
|
import { PipesModule } from "./modules/pipes/pipes.module";
|
||||||
import { SharedModule } from "./modules/shared.module";
|
import { SharedModule } from "./modules/shared.module";
|
||||||
import { VaultFilterModule } from "./modules/vault-filter/vault-filter.module";
|
import { VaultFilterModule } from "./modules/vault-filter/vault-filter.module";
|
||||||
@@ -13,6 +14,7 @@ import { OrganizationBadgeModule } from "./modules/vault/modules/organization-ba
|
|||||||
VaultFilterModule,
|
VaultFilterModule,
|
||||||
OrganizationBadgeModule,
|
OrganizationBadgeModule,
|
||||||
PipesModule,
|
PipesModule,
|
||||||
|
OrganizationManageModule,
|
||||||
],
|
],
|
||||||
exports: [LooseComponentsModule, VaultFilterModule, OrganizationBadgeModule, PipesModule],
|
exports: [LooseComponentsModule, VaultFilterModule, OrganizationBadgeModule, PipesModule],
|
||||||
bootstrap: [],
|
bootstrap: [],
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<form #form (ngSubmit)="load()" [appApiAction]="formPromise" class="container" ngNativeValidate>
|
<form #form (ngSubmit)="load()" [appApiAction]="formPromise" class="container" ngNativeValidate>
|
||||||
<div class="row justify-content-center mt-5">
|
<div class="row justify-content-center mt-5">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<p class="lead text-center mb-4">Bitwarden Send</p>
|
<h1 class="lead text-center mb-4">Bitwarden Send</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 text-center" *ngIf="creatorIdentifier != null">
|
<div class="col-12 text-center" *ngIf="creatorIdentifier != null">
|
||||||
<p>{{ "sendCreatorIdentifier" | i18n: creatorIdentifier }}</p>
|
<p>{{ "sendCreatorIdentifier" | i18n: creatorIdentifier }}</p>
|
||||||
|
|||||||
@@ -83,7 +83,11 @@ export class PreferencesComponent implements OnInit {
|
|||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
if (!this.vaultTimeout.valid) {
|
if (!this.vaultTimeout.valid) {
|
||||||
this.platformUtilsService.showToast("error", null, this.i18nService.t("vaultTimeoutToLarge"));
|
this.platformUtilsService.showToast(
|
||||||
|
"error",
|
||||||
|
null,
|
||||||
|
this.i18nService.t("vaultTimeoutRangeError")
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,5 +41,9 @@
|
|||||||
<small>{{ "minutes" | i18n }}</small>
|
<small>{{ "minutes" | i18n }}</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<small *ngIf="!exceedsMinimumTimout" class="tw-text-danger">
|
||||||
|
<i class="bwi bwi-error" aria-hidden="true"></i> {{ "vaultCustomTimeoutMinimum" | i18n }}
|
||||||
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -40,13 +40,11 @@ export class GeneratorComponent extends BaseGeneratorComponent {
|
|||||||
route,
|
route,
|
||||||
window
|
window
|
||||||
);
|
);
|
||||||
if (platformUtilsService.isSelfHost()) {
|
// Cannot use Firefox Relay on the web vault yet due to CORS issues with Firefox Relay API
|
||||||
// Cannot use Firefox Relay on self hosted web vaults due to CORS issues with Firefox Relay API
|
this.forwardOptions.splice(
|
||||||
this.forwardOptions.splice(
|
this.forwardOptions.findIndex((o) => o.value === "firefoxrelay"),
|
||||||
this.forwardOptions.findIndex((o) => o.value === "firefoxrelay"),
|
1
|
||||||
1
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async history() {
|
async history() {
|
||||||
|
|||||||
@@ -4431,6 +4431,12 @@
|
|||||||
"vaultTimeoutToLarge": {
|
"vaultTimeoutToLarge": {
|
||||||
"message": "Your vault timeout exceeds the restriction set by your organization."
|
"message": "Your vault timeout exceeds the restriction set by your organization."
|
||||||
},
|
},
|
||||||
|
"vaultCustomTimeoutMinimum": {
|
||||||
|
"message": "Minimum custom timeout is 1 minute."
|
||||||
|
},
|
||||||
|
"vaultTimeoutRangeError": {
|
||||||
|
"message": "Vault Timeout is not within allowed range."
|
||||||
|
},
|
||||||
"disablePersonalVaultExport": {
|
"disablePersonalVaultExport": {
|
||||||
"message": "Disable Personal Vault Export"
|
"message": "Disable Personal Vault Export"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -204,8 +204,60 @@ const devServer =
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
key: "Content-Security-Policy",
|
key: "Content-Security-Policy",
|
||||||
value:
|
value: `
|
||||||
"default-src 'self'; script-src 'self' 'sha256-ryoU+5+IUZTuUyTElqkrQGBJXr1brEv6r2CA62WUw8w=' https://js.stripe.com https://js.braintreegateway.com https://www.paypalobjects.com; style-src 'self' https://assets.braintreegateway.com https://*.paypal.com 'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=' 'sha256-JVRXyYPueLWdwGwY9m/7u4QlZ1xeQdqUj2t8OVIzZE4='; img-src 'self' data: https://icons.bitwarden.net https://*.paypal.com https://www.paypalobjects.com https://q.stripe.com https://haveibeenpwned.com https://www.gravatar.com; child-src 'self' https://js.stripe.com https://assets.braintreegateway.com https://*.paypal.com https://*.duosecurity.com; frame-src 'self' https://js.stripe.com https://assets.braintreegateway.com https://*.paypal.com https://*.duosecurity.com; connect-src 'self' wss://notifications.bitwarden.com https://notifications.bitwarden.com https://cdn.bitwarden.net https://api.pwnedpasswords.com https://2fa.directory/api/v3/totp.json https://api.stripe.com https://www.paypal.com https://api.braintreegateway.com https://client-analytics.braintreegateway.com https://*.braintree-api.com https://*.blob.core.windows.net https://app.simplelogin.io/api/alias/random/new https://app.anonaddy.com/api/v1/aliases; object-src 'self' blob:;",
|
default-src 'self';
|
||||||
|
script-src
|
||||||
|
'self'
|
||||||
|
'sha256-ryoU+5+IUZTuUyTElqkrQGBJXr1brEv6r2CA62WUw8w='
|
||||||
|
https://js.stripe.com
|
||||||
|
https://js.braintreegateway.com
|
||||||
|
https://www.paypalobjects.com;
|
||||||
|
style-src
|
||||||
|
'self'
|
||||||
|
https://assets.braintreegateway.com
|
||||||
|
https://*.paypal.com
|
||||||
|
'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='
|
||||||
|
'sha256-JVRXyYPueLWdwGwY9m/7u4QlZ1xeQdqUj2t8OVIzZE4=';
|
||||||
|
'sha256-0xHKHIT3+e2Gknxsm/cpErSprhL+o254L/y5bljg74U='
|
||||||
|
img-src
|
||||||
|
'self'
|
||||||
|
data:
|
||||||
|
https://icons.bitwarden.net
|
||||||
|
https://*.paypal.com
|
||||||
|
https://www.paypalobjects.com
|
||||||
|
https://q.stripe.com
|
||||||
|
https://haveibeenpwned.com
|
||||||
|
https://www.gravatar.com;
|
||||||
|
child-src
|
||||||
|
'self'
|
||||||
|
https://js.stripe.com
|
||||||
|
https://assets.braintreegateway.com
|
||||||
|
https://*.paypal.com
|
||||||
|
https://*.duosecurity.com;
|
||||||
|
frame-src
|
||||||
|
'self'
|
||||||
|
https://js.stripe.com
|
||||||
|
https://assets.braintreegateway.com
|
||||||
|
https://*.paypal.com
|
||||||
|
https://*.duosecurity.com;
|
||||||
|
connect-src
|
||||||
|
'self'
|
||||||
|
wss://notifications.bitwarden.com
|
||||||
|
https://notifications.bitwarden.com
|
||||||
|
https://cdn.bitwarden.net
|
||||||
|
https://api.pwnedpasswords.com
|
||||||
|
https://2fa.directory/api/v3/totp.json
|
||||||
|
https://api.stripe.com
|
||||||
|
https://www.paypal.com
|
||||||
|
https://api.braintreegateway.com
|
||||||
|
https://client-analytics.braintreegateway.com
|
||||||
|
https://*.braintree-api.com
|
||||||
|
https://*.blob.core.windows.net
|
||||||
|
https://app.simplelogin.io/api/alias/random/new
|
||||||
|
https://app.anonaddy.com/api/v1/aliases;
|
||||||
|
object-src
|
||||||
|
'self'
|
||||||
|
blob:;`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user