Skip to content

Commit 01c14c0

Browse files
authored
Merge pull request #721 from sh-andriy/fix/ENG-9166_fix-curator-permissions
[ENG-9166] | fix delete button vis…
2 parents 08696af + 98282b5 commit 01c14c0

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/app/features/project/settings/components/settings-project-form-card/settings-project-form-card.component.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ <h2 class="pb-4">{{ 'myProjects.settings.project' | translate }}</h2>
3333
></p-button>
3434
</div>
3535

36-
<div class="flex justify-content-end w-full flex-0 border-top-1 pt-4 border-gray-300">
37-
<p-button (onClick)="deleteProject.emit()" severity="danger" [label]="deleteLabel() | translate"></p-button>
38-
</div>
36+
@if (canDelete()) {
37+
<div class="flex justify-content-end w-full flex-0 border-top-1 pt-4 border-gray-300">
38+
<p-button (onClick)="deleteProject.emit()" severity="danger" [label]="deleteLabel() | translate"></p-button>
39+
</div>
40+
}
3941
</form>
4042
</p-card>

src/app/features/project/settings/components/settings-project-form-card/settings-project-form-card.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export class SettingsProjectFormCardComponent {
2525
projectDetails = input.required<NodeDetailsModel>();
2626
submitForm = output<ProjectDetailsModel>();
2727
deleteProject = output<void>();
28+
canDelete = input<boolean>(false);
2829

2930
readonly ProjectFormControls = ProjectFormControls;
3031
readonly inputLimits = InputLimits;

src/app/features/project/settings/settings.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
(submitForm)="submitForm($event)"
1111
(deleteProject)="deleteProject()"
1212
[projectDetails]="projectDetails()"
13+
[canDelete]="hasAdminAccess()"
1314
/>
1415

1516
<osf-settings-storage-location-card

0 commit comments

Comments
 (0)