mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-25 01:58:35 +01:00
Merge pull request #6499 from cd1989/retag-button-for-guest
Enable retag button to project guest
This commit is contained in:
commit
e9a34224e4
@ -75,7 +75,7 @@
|
||||
</div>
|
||||
</clr-dropdown-menu>
|
||||
</clr-dropdown>
|
||||
<button type="button" class="btn btn-sm btn-secondary" [disabled]="!(selectedRow.length===1 && developerRoleOrAbove)" (click)="retag(selectedRow)"><clr-icon shape="copy" size="16"></clr-icon> {{'REPOSITORY.RETAG' | translate}}</button>
|
||||
<button type="button" class="btn btn-sm btn-secondary" [disabled]="!(selectedRow.length===1 && guestRoleOrAbove)" (click)="retag(selectedRow)"><clr-icon shape="copy" size="16"></clr-icon> {{'REPOSITORY.RETAG' | translate}}</button>
|
||||
<button type="button" class="btn btn-sm btn-secondary" *ngIf="hasProjectAdminRole" (click)="deleteTags(selectedRow)" [disabled]="!selectedRow.length"><clr-icon shape="times" size="16"></clr-icon> {{'REPOSITORY.DELETE' | translate}}</button>
|
||||
</clr-dg-action-bar>
|
||||
<clr-dg-column style="width: 120px;" [clrDgField]="'name'">{{'REPOSITORY.TAG' | translate}}</clr-dg-column>
|
||||
|
@ -761,6 +761,10 @@ export class TagComponent implements OnInit, AfterViewInit {
|
||||
}
|
||||
|
||||
public get developerRoleOrAbove(): boolean {
|
||||
return this.memberRoleID === Roles.DEVELOPER || this.hasProjectAdminRole;
|
||||
return this.memberRoleID === Roles.DEVELOPER || this.hasProjectAdminRole;
|
||||
}
|
||||
|
||||
public get guestRoleOrAbove(): boolean {
|
||||
return this.memberRoleID === Roles.GUEST || this.memberRoleID === Roles.DEVELOPER || this.hasProjectAdminRole;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user