mirror of
https://github.com/bitwarden/web
synced 2025-12-15 07:43:16 +00:00
Compare commits
13 Commits
allow-all-
...
bug/ps-136
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63aa95d55b | ||
|
|
eab8908206 | ||
|
|
eab478da0c | ||
|
|
5a78853de5 | ||
|
|
51ee899c5e | ||
|
|
26065d3542 | ||
|
|
b4ddce1da2 | ||
|
|
6ee47f0057 | ||
|
|
7b55c8ad1a | ||
|
|
30057d2ac4 | ||
|
|
6f7b712bc7 | ||
|
|
5094a710ac | ||
|
|
67ebf88837 |
@@ -3,7 +3,6 @@
|
|||||||
"notifications": "http://localhost:61840"
|
"notifications": "http://localhost:61840"
|
||||||
},
|
},
|
||||||
"dev": {
|
"dev": {
|
||||||
"allowedHosts": "bitwarden.local",
|
|
||||||
"proxyApi": "http://localhost:4000",
|
"proxyApi": "http://localhost:4000",
|
||||||
"proxyIdentity": "http://localhost:33656",
|
"proxyIdentity": "http://localhost:33656",
|
||||||
"proxyEvents": "http://localhost:46273",
|
"proxyEvents": "http://localhost:46273",
|
||||||
|
|||||||
2
jslib
2
jslib
Submodule jslib updated: 65584c6496...3cb94623e2
@@ -122,17 +122,20 @@ export abstract class BaseEventsComponent {
|
|||||||
const userId = r.actingUserId == null ? r.userId : r.actingUserId;
|
const userId = r.actingUserId == null ? r.userId : r.actingUserId;
|
||||||
const eventInfo = await this.eventService.getEventInfo(r);
|
const eventInfo = await this.eventService.getEventInfo(r);
|
||||||
const user = this.getUserName(r, userId);
|
const user = this.getUserName(r, userId);
|
||||||
|
const userName = user != null ? user.name : this.i18nService.t("unknown");
|
||||||
|
|
||||||
return new EventView({
|
return new EventView({
|
||||||
message: eventInfo.message,
|
message: eventInfo.message,
|
||||||
humanReadableMessage: eventInfo.humanReadableMessage,
|
humanReadableMessage: eventInfo.humanReadableMessage,
|
||||||
appIcon: eventInfo.appIcon,
|
appIcon: eventInfo.appIcon,
|
||||||
appName: eventInfo.appName,
|
appName: eventInfo.appName,
|
||||||
userId: userId,
|
userId: userId,
|
||||||
userName: user != null ? user.name : this.i18nService.t("unknown"),
|
userName: r.installationId != null ? `Installation: ${r.installationId}` : userName,
|
||||||
userEmail: user != null ? user.email : "",
|
userEmail: user != null ? user.email : "",
|
||||||
date: r.date,
|
date: r.date,
|
||||||
ip: r.ipAddress,
|
ip: r.ipAddress,
|
||||||
type: r.type,
|
type: r.type,
|
||||||
|
installationId: r.installationId,
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
></i>
|
></i>
|
||||||
</button>
|
</button>
|
||||||
<h3 class="filter-title">{{ collectionsGrouping.name | i18n }}</h3>
|
<h3 class="filter-title"> {{ collectionsGrouping.name | i18n }}</h3>
|
||||||
</div>
|
</div>
|
||||||
<ul id="collection-filters" *ngIf="!isCollapsed(collectionsGrouping)" class="filter-options">
|
<ul id="collection-filters" *ngIf="!isCollapsed(collectionsGrouping)" class="filter-options">
|
||||||
<ng-template #recursiveCollections let-collections>
|
<ng-template #recursiveCollections let-collections>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
class="bwi bwi-collection bwi-fw"
|
class="bwi bwi-collection bwi-fw"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
></i
|
></i
|
||||||
>{{ c.node.name }}
|
> {{ c.node.name }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
<ul
|
<ul
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<ng-container *ngIf="!hide && !activeFilter.selectedOrganizationId">
|
<ng-container *ngIf="!hide">
|
||||||
<div class="filter-heading">
|
<div class="filter-heading">
|
||||||
<button
|
<button
|
||||||
class="toggle-button"
|
class="toggle-button"
|
||||||
@@ -16,9 +16,7 @@
|
|||||||
}"
|
}"
|
||||||
></i>
|
></i>
|
||||||
</button>
|
</button>
|
||||||
<h3 class="filter-title">
|
<h3 class="filter-title"> {{ "folders" | i18n }}</h3>
|
||||||
{{ "folders" | i18n }}
|
|
||||||
</h3>
|
|
||||||
<button
|
<button
|
||||||
class="text-muted ml-auto add-button"
|
class="text-muted ml-auto add-button"
|
||||||
(click)="addFolder()"
|
(click)="addFolder()"
|
||||||
@@ -56,7 +54,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<button class="filter-button" (click)="applyFilter(f.node)">
|
<button class="filter-button" (click)="applyFilter(f.node)">
|
||||||
<i *ngIf="f.children.length === 0" class="bwi bwi-fw bwi-folder" aria-hidden="true"></i
|
<i *ngIf="f.children.length === 0" class="bwi bwi-fw bwi-folder" aria-hidden="true"></i
|
||||||
>{{ f.node.name }}
|
> {{ f.node.name }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="edit-button"
|
class="edit-button"
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngSwitchCase="'organizationMember'">
|
<ng-container *ngSwitchDefault>
|
||||||
<div class="filter-heading">
|
<div class="filter-heading">
|
||||||
<button
|
<button
|
||||||
class="toggle-button"
|
class="toggle-button"
|
||||||
@@ -115,6 +115,7 @@
|
|||||||
routerLink="/create-organization"
|
routerLink="/create-organization"
|
||||||
class="text-muted ml-auto create-organization-link"
|
class="text-muted ml-auto create-organization-link"
|
||||||
appA11yTitle="{{ 'newOrganization' | i18n }}"
|
appA11yTitle="{{ 'newOrganization' | i18n }}"
|
||||||
|
*ngIf="!(displayMode === 'singleOrganizationPolicy')"
|
||||||
>
|
>
|
||||||
<i class="bwi bwi-plus bwi-fw" aria-hidden="true"></i>
|
<i class="bwi bwi-plus bwi-fw" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ export class OrganizationOptionsComponent {
|
|||||||
this.platformUtilsService.showToast("success", null, "Unlinked SSO");
|
this.platformUtilsService.showToast("success", null, "Unlinked SSO");
|
||||||
await this.load();
|
await this.load();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
this.platformUtilsService.showToast("error", this.i18nService.t("errorOccurred"), e.message);
|
||||||
this.logService.error(e);
|
this.logService.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,6 +107,7 @@ export class OrganizationOptionsComponent {
|
|||||||
this.platformUtilsService.showToast("success", null, this.i18nService.t("leftOrganization"));
|
this.platformUtilsService.showToast("success", null, this.i18nService.t("leftOrganization"));
|
||||||
await this.load();
|
await this.load();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
this.platformUtilsService.showToast("error", this.i18nService.t("errorOccurred"), e.message);
|
||||||
this.logService.error(e);
|
this.logService.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -173,6 +175,7 @@ export class OrganizationOptionsComponent {
|
|||||||
this.platformUtilsService.showToast("success", null, this.i18nService.t(toastStringRef));
|
this.platformUtilsService.showToast("success", null, this.i18nService.t(toastStringRef));
|
||||||
await this.load();
|
await this.load();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
this.platformUtilsService.showToast("error", this.i18nService.t("errorOccurred"), e.message);
|
||||||
this.logService.error(e);
|
this.logService.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,9 +15,7 @@
|
|||||||
}"
|
}"
|
||||||
></i>
|
></i>
|
||||||
</button>
|
</button>
|
||||||
<h3>
|
<h3> {{ "types" | i18n }}</h3>
|
||||||
{{ "types" | i18n }}
|
|
||||||
</h3>
|
|
||||||
</div>
|
</div>
|
||||||
<ul id="type-filters" *ngIf="!isCollapsed" class="filter-options">
|
<ul id="type-filters" *ngIf="!isCollapsed" class="filter-options">
|
||||||
<li
|
<li
|
||||||
@@ -26,14 +24,14 @@
|
|||||||
>
|
>
|
||||||
<span class="filter-buttons">
|
<span class="filter-buttons">
|
||||||
<button class="filter-button" (click)="applyFilter(cipherTypeEnum.Login)">
|
<button class="filter-button" (click)="applyFilter(cipherTypeEnum.Login)">
|
||||||
<i class="bwi bwi-fw bwi-globe" aria-hidden="true"></i>{{ "typeLogin" | i18n }}
|
<i class="bwi bwi-fw bwi-globe" aria-hidden="true"></i> {{ "typeLogin" | i18n }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="filter-option" [ngClass]="{ active: activeFilter.cipherType === cipherTypeEnum.Card }">
|
<li class="filter-option" [ngClass]="{ active: activeFilter.cipherType === cipherTypeEnum.Card }">
|
||||||
<span class="filter-buttons">
|
<span class="filter-buttons">
|
||||||
<button class="filter-button" (click)="applyFilter(cipherTypeEnum.Card)">
|
<button class="filter-button" (click)="applyFilter(cipherTypeEnum.Card)">
|
||||||
<i class="bwi bwi-fw bwi-credit-card" aria-hidden="true"></i>{{ "typeCard" | i18n }}
|
<i class="bwi bwi-fw bwi-credit-card" aria-hidden="true"></i> {{ "typeCard" | i18n }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
@@ -43,7 +41,7 @@
|
|||||||
>
|
>
|
||||||
<span class="filter-buttons">
|
<span class="filter-buttons">
|
||||||
<button class="filter-button" (click)="applyFilter(cipherTypeEnum.Identity)">
|
<button class="filter-button" (click)="applyFilter(cipherTypeEnum.Identity)">
|
||||||
<i class="bwi bwi-fw bwi-id-card" aria-hidden="true"></i>{{ "typeIdentity" | i18n }}
|
<i class="bwi bwi-fw bwi-id-card" aria-hidden="true"></i> {{ "typeIdentity" | i18n }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
@@ -53,7 +51,9 @@
|
|||||||
>
|
>
|
||||||
<span class="filter-buttons">
|
<span class="filter-buttons">
|
||||||
<button class="filter-button" (click)="applyFilter(cipherTypeEnum.SecureNote)">
|
<button class="filter-button" (click)="applyFilter(cipherTypeEnum.SecureNote)">
|
||||||
<i class="bwi bwi-fw bwi-sticky-note" aria-hidden="true"></i>{{ "typeSecureNote" | i18n }}
|
<i class="bwi bwi-fw bwi-sticky-note" aria-hidden="true"></i> {{
|
||||||
|
"typeSecureNote" | i18n
|
||||||
|
}}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -28,16 +28,6 @@ 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.
|
|
||||||
// It should be removed as soon as doing so makes sense.
|
|
||||||
async reloadOrganizations() {
|
|
||||||
this.organizations = await this.vaultFilterService.buildOrganizations();
|
|
||||||
this.activePersonalOwnershipPolicy =
|
|
||||||
await this.vaultFilterService.checkForPersonalOwnershipPolicy();
|
|
||||||
this.activeSingleOrganizationPolicy =
|
|
||||||
await this.vaultFilterService.checkForSingleOrganizationPolicy();
|
|
||||||
}
|
|
||||||
|
|
||||||
async initCollections() {
|
async initCollections() {
|
||||||
return await this.vaultFilterService.buildCollections(this.organization?.id);
|
return await this.vaultFilterService.buildCollections(this.organization?.id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ export class IndividualVaultComponent implements OnInit, OnDestroy {
|
|||||||
cipherPassesFilter = cipher.type === this.activeFilter.cipherType;
|
cipherPassesFilter = cipher.type === this.activeFilter.cipherType;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
this.activeFilter.selectedFolderId != null &&
|
this.activeFilter.selectedFolder &&
|
||||||
this.activeFilter.selectedFolderId != "none" &&
|
this.activeFilter.selectedFolderId != "none" &&
|
||||||
cipherPassesFilter
|
cipherPassesFilter
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
|
|||||||
cipherPassesFilter = cipher.type === this.activeFilter.cipherType;
|
cipherPassesFilter = cipher.type === this.activeFilter.cipherType;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
this.activeFilter.selectedFolderId != null &&
|
this.activeFilter.selectedFolder != null &&
|
||||||
this.activeFilter.selectedFolderId != "none" &&
|
this.activeFilter.selectedFolderId != "none" &&
|
||||||
cipherPassesFilter
|
cipherPassesFilter
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Injectable } from "@angular/core";
|
import { Injectable } from "@angular/core";
|
||||||
import { ActivatedRouteSnapshot, CanActivate, Router } from "@angular/router";
|
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from "@angular/router";
|
||||||
|
|
||||||
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
||||||
import { OrganizationService } from "jslib-common/abstractions/organization.service";
|
import { OrganizationService } from "jslib-common/abstractions/organization.service";
|
||||||
@@ -17,7 +17,7 @@ export class PermissionsGuard implements CanActivate {
|
|||||||
private syncService: SyncService
|
private syncService: SyncService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async canActivate(route: ActivatedRouteSnapshot) {
|
async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
|
||||||
// TODO: We need to fix this issue once and for all.
|
// TODO: We need to fix this issue once and for all.
|
||||||
if ((await this.syncService.getLastSync()) == null) {
|
if ((await this.syncService.getLastSync()) == null) {
|
||||||
await this.syncService.fullSync(false);
|
await this.syncService.fullSync(false);
|
||||||
@@ -39,6 +39,16 @@ export class PermissionsGuard implements CanActivate {
|
|||||||
|
|
||||||
const permissions = route.data == null ? [] : (route.data.permissions as Permissions[]);
|
const permissions = route.data == null ? [] : (route.data.permissions as Permissions[]);
|
||||||
if (permissions != null && !org.hasAnyPermission(permissions)) {
|
if (permissions != null && !org.hasAnyPermission(permissions)) {
|
||||||
|
// Handle linkable ciphers for organizations the user only has view access to
|
||||||
|
// https://bitwarden.atlassian.net/browse/EC-203
|
||||||
|
if (state.root.queryParamMap.has("cipherId")) {
|
||||||
|
return this.router.createUrlTree(["/vault"], {
|
||||||
|
queryParams: {
|
||||||
|
cipherId: state.root.queryParamMap.get("cipherId"),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
this.platformUtilsService.showToast("error", null, this.i18nService.t("accessDenied"));
|
this.platformUtilsService.showToast("error", null, this.i18nService.t("accessDenied"));
|
||||||
return this.router.createUrlTree(["/"]);
|
return this.router.createUrlTree(["/"]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -307,6 +307,9 @@ export class EventService {
|
|||||||
case EventType.Organization_DisabledKeyConnector:
|
case EventType.Organization_DisabledKeyConnector:
|
||||||
msg = humanReadableMsg = this.i18nService.t("disabledKeyConnector");
|
msg = humanReadableMsg = this.i18nService.t("disabledKeyConnector");
|
||||||
break;
|
break;
|
||||||
|
case EventType.Organization_SponsorshipsSynced:
|
||||||
|
msg = humanReadableMsg = this.i18nService.t("sponsorshipsSynced");
|
||||||
|
break;
|
||||||
// Policies
|
// Policies
|
||||||
case EventType.Policy_Updated: {
|
case EventType.Policy_Updated: {
|
||||||
msg = this.i18nService.t("modifiedPolicyId", this.formatPolicyId(ev));
|
msg = this.i18nService.t("modifiedPolicyId", this.formatPolicyId(ev));
|
||||||
|
|||||||
@@ -5005,7 +5005,7 @@
|
|||||||
"message": "Service"
|
"message": "Service"
|
||||||
},
|
},
|
||||||
"unknownCipher": {
|
"unknownCipher": {
|
||||||
"message": "Unknown Item, you may need to login with another account to access this item."
|
"message": "Unknown Item, you may need to request permission to access this item."
|
||||||
},
|
},
|
||||||
"cannotSponsorSelf": {
|
"cannotSponsorSelf": {
|
||||||
"message": "You cannot redeem for the active account. Enter a different email."
|
"message": "You cannot redeem for the active account. Enter a different email."
|
||||||
@@ -5041,6 +5041,9 @@
|
|||||||
"message": "Last Sync",
|
"message": "Last Sync",
|
||||||
"Description": "Used as a prefix to indicate the last time a sync occured. Example \"Last sync 1968-11-16 00:00:00\""
|
"Description": "Used as a prefix to indicate the last time a sync occured. Example \"Last sync 1968-11-16 00:00:00\""
|
||||||
},
|
},
|
||||||
|
"sponsorshipsSynced": {
|
||||||
|
"message": "Self-hosted sponsorships synced."
|
||||||
|
},
|
||||||
"billingManagedByProvider": {
|
"billingManagedByProvider": {
|
||||||
"message": "Managed by $PROVIDER$",
|
"message": "Managed by $PROVIDER$",
|
||||||
"placeholders": {
|
"placeholders": {
|
||||||
|
|||||||
Reference in New Issue
Block a user