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.
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
Will be fixed by bug 29020. *** This bug has been marked as a duplicate of bug 29020 ***