KatjaGlassConsulting / ApprovalBundle

A Kimai Plugin to manage weekly approval workflow
MIT License
11 stars 14 forks source link

Users with the ROLE_SUPER_ADMIN can not submit timesheets. #13

Closed JamesRy96 closed 1 year ago

JamesRy96 commented 1 year ago

Would it be possible to show users with the super admin role in the approved weeks report?

We have more senior members of our technical staff assigned the super admin role in order to create/restore backups or make system configuration changes. Other members are assigned the admin role to allow them support options without giving them access to breaking changes.

We're using SAML as our only authentication method with form login disabled. I used the console to demote the users and submit their timesheets; the super admin role will be reassigned on their next login due to the SAML group memberships.

Currently my thoughts workarounds are we'd need to make an additional paid Azure AD account for each super admin user (we force two step) and have them use two account or create a copy of the super admin role in Kimai and assign them that role instead of the build in role.

It would be nice if super admins could submit a sheet (currently there's no option to submit because they're excluded from the report) that could be approved by any teamlead of theirs.

KatjaGlassConsulting commented 1 year ago

Actually it is just one line in the source - you can try the branch: https://github.com/KatjaGlassConsulting/ApprovalBundle/tree/IncludeAdmin. Then SuperUsers are not excluded. Please be aware that super-users have special roles and can per default self approve their timesheets and even change times after locking (per default role).

I have not done any testing and impact analysis. There might be a new option coming for an official release where SuperUsers could be included or not. But that will take quite some time. In the process I know, the admins have two accounts which omits the risk that the person accidently changes something when logged in as "normal" user.

JamesRy96 commented 1 year ago

Awesome! Thank you so much. This has worked perfectly for out need.