1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-04 09:33:27 +00:00

[Policy] Personal Ownership (#722)

* Initial commit of personal ownership policy

* Added event handling for modifying policies

* I didn't save the merge conflict fix...

* Removed unused import

* Updated jslib (dcbd09e -> 2d62e10)
This commit is contained in:
Vincent Salucci
2020-12-08 13:24:59 -06:00
committed by GitHub
parent a8af807650
commit 218caa28b0
7 changed files with 76 additions and 7 deletions

View File

@@ -165,6 +165,11 @@ export class EventService {
msg = this.i18nService.t('exportedOrganizationVault');
break;
*/
// Policies
case EventType.Policy_Updated:
msg = this.i18nService.t('modifiedPolicy', this.formatPolicyId(ev));
break;
default:
break;
}
@@ -251,6 +256,13 @@ export class EventService {
return a.outerHTML;
}
private formatPolicyId(ev: EventResponse) {
const shortId = this.getShortId(ev.policyId);
const a = this.makeAnchor(shortId);
a.setAttribute('href', '#/organizations/' + ev.organizationId + '/manage/policies?policyId=' + ev.policyId);
return a.outerHTML;
}
private makeAnchor(shortId: string) {
const a = document.createElement('a');
a.title = this.i18nService.t('view');