Fix: disable inline create buttons if insufficient permissions (#7401)

This commit is contained in:
shamoon
2024-08-05 16:45:48 -07:00
committed by GitHub
parent 9cca7aaa08
commit 928580bf4f
7 changed files with 81 additions and 41 deletions

View File

@@ -32,7 +32,7 @@
</div>
</ng-template>
</ng-select>
@if (allowCreate) {
@if (allowCreate && !hideAddButton) {
<button class="btn btn-outline-secondary" type="button" (click)="createTag()" [disabled]="disabled">
<i-bs width="1.2em" height="1.2em" name="plus"></i-bs>
</button>

View File

@@ -74,6 +74,9 @@ export class TagsComponent implements OnInit, ControlValueAccessor {
@Input()
allowCreate: boolean = true
@Input()
hideAddButton: boolean = false
@Input()
showFilter: boolean = false