Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Redefine `work_package_reminders/manage` capability

Kabiru Mwenjae0e13e468ce9
diff --git a/config/initializers/permissions.rb b/config/initializers/permissions.rb
index 33d7e12cd9b..68ae8d2026a 100644
--- a/config/initializers/permissions.rb
+++ b/config/initializers/permissions.rb
@@ -250,7 +250,7 @@ Rails.application.reloader.to_prepare do
},
permissible_on: %i[work_package project],
contract_actions: { work_packages: %i[read],
- work_package_reminders: %i[modal_body] }
+ work_package_reminders: %i[manage] }
wpt.permission :add_work_packages,
{
diff --git a/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.component.ts b/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.component.ts
index c673630f1c5..eedef228d7a 100644
--- a/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.component.ts
+++ b/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.component.ts
@@ -66,7 +66,7 @@ export class WorkPackageSplitViewToolbarComponent implements OnInit {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
this.displayShareButton$ = this.currentUserService.hasCapabilities$('work_package_shares/index', this.workPackage.project.id);
this.displayReminderButton$ = this.currentUserService.isLoggedInAndHasCapabalities$(
- 'work_package_reminders/modal_body',
+ 'work_package_reminders/manage',
(this.workPackage.project as ProjectResource).id,
);
}
diff --git a/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.component.ts b/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.component.ts
index 51546acd32c..af613927a11 100644
--- a/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.component.ts
+++ b/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.component.ts
@@ -123,7 +123,7 @@ export class WorkPackagesFullViewComponent extends WorkPackageSingleViewBase imp
this.displayTimerButton = Object.prototype.hasOwnProperty.call(wp, 'logTime');
this.displayShareButton$ = this.currentUserService.hasCapabilities$('work_package_shares/index', (wp.project as ProjectResource).id);
this.displayReminderButton$ = this.currentUserService.isLoggedInAndHasCapabalities$(
- 'work_package_reminders/modal_body',
+ 'work_package_reminders/manage',
(this.workPackage.project as ProjectResource).id,
);