kimai / Paid-plugins

Support for paid Kimai plugins: Discussions and feature requests
https://www.kimai.org/store/
11 stars 1 forks source link

User can't export the completed month PDF (allegedly missing permissions) #137

Closed bhmarscheck closed 5 months ago

bhmarscheck commented 6 months ago

Hi we just got our KIMAI set up, including the employee account plugin. I am generally very pleased with our decision going with KIMAI and buying the plugin. If things go well we will probably get the kiosk plugin as well. I am trying to set things up for our users and prepare everything for the on boarding.

No I have come across something I am not sure if it is user/admin error, just a case of RTFM (which believe I did) or a bug: I have filled the time sheet for a January with my user role account and locked the month with my admin account. I can now get the "completed month PDF" via right click with the admin account just fine but with the user account I get this:

Screenshot 2024-03-08 002242

The user role has export_own_timesheet and view_booking_contract enabled and I can't figure out what I have to enable so the user can get this PDF too. Is this intended, a case of misconfiguration and did I over read something in the documentation?

kevinpapst commented 6 months ago

Thanks for the report!

You are right, there is a permission problem, mainly one check too much.

While I prepare the next release, you can alreday fix the issue on your end. Open the file kimai/var/plugins/WorkContractBundle/Controller/WorkingTimesApprovalPdfController.php and remove line 33:

#[IsGranted('contract', 'user')]
kevinpapst commented 5 months ago

You can download the latest release, which should fix the problem