-
- {{ "types" | i18n }}
-
+ {{ "types" | i18n }}
-
-
@@ -43,7 +41,7 @@
>
@@ -53,7 +51,9 @@
>
diff --git a/src/app/modules/vault-filter/vault-filter.component.ts b/src/app/modules/vault-filter/vault-filter.component.ts
index 66ade731..56b72172 100644
--- a/src/app/modules/vault-filter/vault-filter.component.ts
+++ b/src/app/modules/vault-filter/vault-filter.component.ts
@@ -28,16 +28,6 @@ export class VaultFilterComponent extends BaseVaultFilterComponent {
this.onSearchTextChanged.emit(this.searchText.normalize("NFD").replace(/[\u0300-\u036f]/g, ""));
}
- // 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() {
return await this.vaultFilterService.buildCollections(this.organization?.id);
}
diff --git a/src/app/modules/vault/modules/individual-vault/individual-vault.component.ts b/src/app/modules/vault/modules/individual-vault/individual-vault.component.ts
index c1bf9b51..47e1906a 100644
--- a/src/app/modules/vault/modules/individual-vault/individual-vault.component.ts
+++ b/src/app/modules/vault/modules/individual-vault/individual-vault.component.ts
@@ -209,7 +209,7 @@ export class IndividualVaultComponent implements OnInit, OnDestroy {
cipherPassesFilter = cipher.type === this.activeFilter.cipherType;
}
if (
- this.activeFilter.selectedFolderId != null &&
+ this.activeFilter.selectedFolder &&
this.activeFilter.selectedFolderId != "none" &&
cipherPassesFilter
) {
diff --git a/src/app/modules/vault/modules/organization-vault/organization-vault.component.ts b/src/app/modules/vault/modules/organization-vault/organization-vault.component.ts
index 6741ab37..c7edcbe0 100644
--- a/src/app/modules/vault/modules/organization-vault/organization-vault.component.ts
+++ b/src/app/modules/vault/modules/organization-vault/organization-vault.component.ts
@@ -172,7 +172,7 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
cipherPassesFilter = cipher.type === this.activeFilter.cipherType;
}
if (
- this.activeFilter.selectedFolderId != null &&
+ this.activeFilter.selectedFolder != null &&
this.activeFilter.selectedFolderId != "none" &&
cipherPassesFilter
) {
diff --git a/src/app/organizations/guards/permissions.guard.ts b/src/app/organizations/guards/permissions.guard.ts
index 4ad57895..2f203559 100644
--- a/src/app/organizations/guards/permissions.guard.ts
+++ b/src/app/organizations/guards/permissions.guard.ts
@@ -1,5 +1,5 @@
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 { OrganizationService } from "jslib-common/abstractions/organization.service";
@@ -17,7 +17,7 @@ export class PermissionsGuard implements CanActivate {
private syncService: SyncService
) {}
- async canActivate(route: ActivatedRouteSnapshot) {
+ async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
// TODO: We need to fix this issue once and for all.
if ((await this.syncService.getLastSync()) == null) {
await this.syncService.fullSync(false);
@@ -39,6 +39,16 @@ export class PermissionsGuard implements CanActivate {
const permissions = route.data == null ? [] : (route.data.permissions as 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"));
return this.router.createUrlTree(["/"]);
}
diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json
index 26cc24d0..4e15b6ad 100644
--- a/src/locales/en/messages.json
+++ b/src/locales/en/messages.json
@@ -5005,7 +5005,7 @@
"message": "Service"
},
"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": {
"message": "You cannot redeem for the active account. Enter a different email."