Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limitation of rights to modify HR informations on their own profile #23700

Closed
wants to merge 0 commits into from

Conversation

comaiteseb
Copy link
Contributor

FIX

Limitation of rights to modify HR informations (salaries, daily rate, hourly rate, position held, date of entry, etc.) on their own profile so that a simple employee can access it without however being able to modify it
A user with the right user->self->creer but not having the right user->user->creer will not be able to modify his position, his salary, his tjm and thm as well as his date of entry.

@@ -2791,7 +2792,11 @@
// Salary
print '<tr><td>'.$langs->trans("Salary").'</td>';
print '<td>';
print img_picto('', 'salary', 'class="pictofixedwidth paddingright"').'<input size="8" type="text" name="salary" value="'.price2num(GETPOST('salary') ?GETPOST('salary') : $object->salary).'">';
if ($caneditsensitivedata) {
Copy link
Member

Choose a reason for hiding this comment

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

The salary is not a data on the control of the user. So i think it should be managed by the permission on the salary or rh module (generally owned by HR people). Not by a permission on users (generally owned by admin).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what do you think about using user->right->salaries->write for the salary field and user->rights->hrm->write_personal_information->write for the others (job, weekly hours, tjm, thm,dateemployment and dateemploymentend) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eldy is this Ok for you ?

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Jan 30, 2023
@comaiteseb comaiteseb requested a review from eldy January 31, 2023 15:37
@comaiteseb comaiteseb closed this Nov 19, 2023
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.

None yet

2 participants