Closed rbuehler-teletrend closed 2 years ago
Will be fixed for the next major release.
You can already test it here: https://demo-branch.kimai.org/ with susan_super
and kitten
The next major version will have a different navigation structure, with single entries for the different invoice screens:
Creating a user/role with the described permissions now leads to this navigation:
This user will be able to only download existing invoices in 2.0
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.
Describe the bug Users with _viewinvoice permission assigned but without _createinvoice permission, can't download existing PDF invoices from the invoice list. I would expect that with _viewinvoice permission one should be able to view all details in the invoice list (_view_alldata permission is given as well). Also, it is a pitty that for those users the /invoice/ page is loaded by default as this will throw an error message due to insufficient permissions. Instead, for those users with viewer permission only, the /invoice/show/ page should be loaded by default.
To Reproduce
Logfile [2022-02-03 08:40:23] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: "Access denied." at /var/www/kimai2/vendor/symfony/security-http/Firewall/ExceptionListener.php line 137 {"exception":"[object] (Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException(code: 0): Access denied. at /var/www/kimai2/vendor/symfony/security-http/Firewall/ExceptionListener.php:137, Symfony\Component\Security\Core\Exception\AccessDeniedException(code: 403): Access denied. at /var/www/kimai2/vendor/sensio/framework-extra-bundle/src/EventListener/SecurityListener.php:79)"} [] [2022-02-03 08:40:23] request.INFO: Matched route "admin_invoice_download". {"route":"admin_invoice_download","route_parameters":{"_route":"admin_invoice_download","_controller":"App\Controller\InvoiceController::downloadAction","_locale":"de_CH","id":"5"},"request_uri":"https://xxxxxxxxx/de_CH/invoice/download/5","method":"GET"} []
Additional context