diff --git a/src/portal/lib/src/repository/repository.component.html b/src/portal/lib/src/repository/repository.component.html
index 12ddb50cc..02dde58d9 100644
--- a/src/portal/lib/src/repository/repository.component.html
+++ b/src/portal/lib/src/repository/repository.component.html
@@ -47,7 +47,10 @@
diff --git a/src/portal/lib/src/repository/repository.component.ts b/src/portal/lib/src/repository/repository.component.ts
index 526fdf756..6a4f81937 100644
--- a/src/portal/lib/src/repository/repository.component.ts
+++ b/src/portal/lib/src/repository/repository.component.ts
@@ -36,6 +36,7 @@ const TabLinkContentMap: {[index: string]: string} = {
export class RepositoryComponent implements OnInit {
signedCon: {[key: string]: any | string[]} = {};
@Input() projectId: number;
+ @Input() memberRoleID: number;
@Input() repoName: string;
@Input() hasSignedIn: boolean;
@Input() hasProjectAdminRole: boolean;
diff --git a/src/portal/lib/src/tag/tag.component.html b/src/portal/lib/src/tag/tag.component.html
index c236434c5..428c82777 100644
--- a/src/portal/lib/src/tag/tag.component.html
+++ b/src/portal/lib/src/tag/tag.component.html
@@ -75,7 +75,7 @@
-
+
{{'REPOSITORY.TAG' | translate}}
diff --git a/src/portal/lib/src/tag/tag.component.ts b/src/portal/lib/src/tag/tag.component.ts
index e0ccbe3f1..65c287d3b 100644
--- a/src/portal/lib/src/tag/tag.component.ts
+++ b/src/portal/lib/src/tag/tag.component.ts
@@ -30,9 +30,9 @@ import { TagService, RetagService, VulnerabilitySeverity, RequestQueryParams } f
import { ErrorHandler } from "../error-handler/error-handler";
import { ChannelService } from "../channel/index";
import {
- ConfirmationTargets,
- ConfirmationState,
- ConfirmationButtons
+ ConfirmationTargets,
+ ConfirmationState,
+ ConfirmationButtons, Roles
} from "../shared/shared.const";
import { ConfirmationDialogComponent } from "../confirmation-dialog/confirmation-dialog.component";
@@ -73,6 +73,7 @@ export class TagComponent implements OnInit, AfterViewInit {
signedCon: {[key: string]: any | string[]} = {};
@Input() projectId: number;
+ @Input() memberRoleID: number;
@Input() repoName: string;
@Input() isEmbedded: boolean;
@@ -755,4 +756,8 @@ export class TagComponent implements OnInit, AfterViewInit {
onCpError($event: any): void {
this.copyInput.setPullCommendShow();
}
+
+ public get developerRoleOrAbove(): boolean {
+ return this.memberRoleID === Roles.DEVELOPER || this.hasProjectAdminRole;
+ }
}
diff --git a/src/portal/src/app/repository/tag-repository/tag-repository.component.html b/src/portal/src/app/repository/tag-repository/tag-repository.component.html
index a67d36d79..7c6c94c73 100644
--- a/src/portal/src/app/repository/tag-repository/tag-repository.component.html
+++ b/src/portal/src/app/repository/tag-repository/tag-repository.component.html
@@ -3,6 +3,7 @@
{{'SIDE_NAV.PROJECTS'| translate}}
< {{'REPOSITORY.REPOSITORIES'| translate}}
-
\ No newline at end of file
diff --git a/src/portal/src/app/repository/tag-repository/tag-repository.component.ts b/src/portal/src/app/repository/tag-repository/tag-repository.component.ts
index 75251bc4b..474c23cdd 100644
--- a/src/portal/src/app/repository/tag-repository/tag-repository.component.ts
+++ b/src/portal/src/app/repository/tag-repository/tag-repository.component.ts
@@ -28,6 +28,7 @@ import { Project } from '../../project/project';
export class TagRepositoryComponent implements OnInit {
projectId: number;
+ projectMemberRoleId: number;
repoName: string;
hasProjectAdminRole: boolean = false;
isGuest: boolean;
@@ -54,6 +55,7 @@ export class TagRepositoryComponent implements OnInit {
if (resolverData) {
this.hasProjectAdminRole = (resolverData['projectResolver']).has_project_admin_role;
this.isGuest = (resolverData['projectResolver']).current_user_role_id === 3;
+ this.projectMemberRoleId = (resolverData['projectResolver']).current_user_role_id;
}
this.repoName = this.route.snapshot.params['repo'];