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

Just reuse `work_package/read` capability Managing reminders is based on the `view_work_packages` permission which is already indentified via `work_packages/read` capability. It would be redundant to introduce a new capability name

Kabiru Mwenja89a570f6bdfd
diff --git a/config/initializers/permissions.rb b/config/initializers/permissions.rb
index 68ae8d2026a..9b6ce3a8e1c 100644
--- a/config/initializers/permissions.rb
+++ b/config/initializers/permissions.rb
@@ -249,8 +249,7 @@ Rails.application.reloader.to_prepare do
"work_packages/reminders": %i[modal_body create update destroy]
},
permissible_on: %i[work_package project],
- contract_actions: { work_packages: %i[read],
- work_package_reminders: %i[manage] }
+ contract_actions: { work_packages: %i[read] }
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 eedef228d7a..3017649a1cd 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/manage',
+ 'work_packages/read',
(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 af613927a11..f97c4bdc164 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/manage',
+ 'work_packages/read',
(this.workPackage.project as ProjectResource).id,
);