Skip to content

Conversation

@kuscoo
Copy link
Contributor

@kuscoo kuscoo commented Nov 7, 2025

NEW/FIX 32909 Add perm to modify HRM/salary information

NEW
Add perm to modify HRM/salary information :

  • Job
  • THM
  • TJM
  • Salary
  • SalaryExtra
  • WeeklyHours
  • DateEmployment

FIX
The user, without right on his employee card, could change his salary.
(only visually, there was no basic change)

$this->rights[$r][self::KEY_ID] = 345;
$this->rights[$r][self::KEY_LABEL] = 'Modify its own HRM/salary informations';
$this->rights[$r][self::KEY_DEFAULT] = 0;
$this->rights[$r][self::KEY_FIRST_LEVEL] = 'self_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
Copy link
Member

@eldy eldy Nov 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need such a permission. However, i think it is better to have it handled by the module HR (Human resources). If module is not enabled, we keep current code (we don't want human resource management so we don't want powerful salary management), but if enable the HR module, we use this permission to know if wa can write salary information. Because when we enable the module HR, it means we want a powerfull manager of salary. In this case, we can use a "common" permission (not need for advanced permission) because it is the "common need" of HR module.

So I suggest to move this permission into the module HRM instead of module user.
It could be
$this->rights[$r][self::KEY_FIRST_LEVEL] = 'write_salary';
$this->rights[$r][self::KEY_SECON_LEVEL] = 'write';

Can you modify your PR in this direction ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a more complete analysis, it seems there is already a permission on salary information, hosted by the module salary.
Can you check if we still need such a pr ?
Or if enabling the module salary is enough to protect salary information ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could handle it. I just need to find some time :-)

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Nov 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Discussion Some questions or discussions are opened and wait answers of author or other people to be processed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants