1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-05 01:53:55 +00:00

[PS-788] - Item links use cipherId in query string (#2880)

* Replace 'cipherId' query param with 'itemId' for linkable ciphers
This commit is contained in:
Shane Melton
2022-06-13 07:14:09 -07:00
committed by GitHub
parent 4f9079dd4f
commit 2d72201650
4 changed files with 41 additions and 20 deletions

View File

@@ -41,10 +41,12 @@ export class PermissionsGuard implements CanActivate {
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")) {
const cipherId =
state.root.queryParamMap.get("itemId") || state.root.queryParamMap.get("cipherId");
if (cipherId) {
return this.router.createUrlTree(["/vault"], {
queryParams: {
cipherId: state.root.queryParamMap.get("cipherId"),
itemId: cipherId,
},
});
}