| Summary: | Only users with manage_background_jobs can cancel a job | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
| Component: | Architecture, internals, and plumbing | Assignee: | Bugs List <koha-bugs> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
| Severity: | major | ||
| Priority: | P5 - low | CC: | fridolin.somers |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Bug Depends on: | 22417, 29020 | ||
| Bug Blocks: | |||
You mean adding : if ( $job->borrowernumber eq $loggedinuser ) But we could argue that any staff user with 'manage_background_jobs' permission should be able to cancel a job, no ? (In reply to Fridolin Somers from comment #1) > You mean adding : > if ( $job->borrowernumber eq $loggedinuser ) > > But we could argue that any staff user with 'manage_background_jobs' > permission should be able to cancel a job, no ? Users with manage_background_jobs are the only ones who can cancel jobs. The idea here is to make it possible for the user who enqueued the job. (In reply to Jonathan Druart from comment #2) > > Users with manage_background_jobs are the only ones who can cancel jobs. The > idea here is to make it possible for the user who enqueued the job. Ahhh thanks I get it now |
64 if ( my $job = Koha::BackgroundJobs->find($id) ) { # FIXME Make sure logged in user can cancel this job 65 $job->cancel; 66 } This FIXME must be fixed ASAP.