Skip to content

Commit

Permalink
Redefine work_package_reminders/manage capability
Browse files Browse the repository at this point in the history
Use a more semantically correct name, rather than the controller action
  • Loading branch information
akabiru committed Jan 20, 2025
1 parent 8d0ead5 commit e0e13e4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/initializers/permissions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
},
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,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);

Expand Down

0 comments on commit e0e13e4

Please sign in to comment.