mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
only show add button if admin
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
<i *ngIf="actionSpinner.loading" class="fa fa-spinner fa-spin text-muted" title="{{'loading' | i18n}}"></i>
|
<i *ngIf="actionSpinner.loading" class="fa fa-spinner fa-spin text-muted" title="{{'loading' | i18n}}"></i>
|
||||||
</small>
|
</small>
|
||||||
</h1>
|
</h1>
|
||||||
<button type="button" class="btn btn-outline-primary btn-sm ml-auto" (click)="addCipher()">
|
<button type="button" class="btn btn-outline-primary btn-sm ml-auto" (click)="addCipher()" *ngIf="showAdd">
|
||||||
<i class="fa fa-plus fa-fw"></i>{{'addItem' | i18n}}
|
<i class="fa fa-plus fa-fw"></i>{{'addItem' | i18n}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ export class VaultComponent implements OnInit {
|
|||||||
organization: Organization;
|
organization: Organization;
|
||||||
collectionId: string;
|
collectionId: string;
|
||||||
type: CipherType;
|
type: CipherType;
|
||||||
|
showAdd = true;
|
||||||
|
|
||||||
private modal: ModalComponent = null;
|
private modal: ModalComponent = null;
|
||||||
|
|
||||||
@@ -56,6 +57,7 @@ export class VaultComponent implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.parent.params.subscribe(async (params) => {
|
this.route.parent.params.subscribe(async (params) => {
|
||||||
this.organization = await this.userService.getOrganization(params.organizationId);
|
this.organization = await this.userService.getOrganization(params.organizationId);
|
||||||
|
this.showAdd = this.organization.isAdmin;
|
||||||
this.groupingsComponent.organization = this.organization;
|
this.groupingsComponent.organization = this.organization;
|
||||||
this.ciphersComponent.organization = this.organization;
|
this.ciphersComponent.organization = this.organization;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user