* FIX#32909 Restrict salary/HR field edit to authorized users
On the user card, a user with only "modify own info" (user->self->write)
could edit thm, tjm, salary, salaryextra and weeklyhours, even though the
display of these fields is gated on salaries->readall / hrm->employee->read.
Guard the write of these fields with the same permission used for display,
so self-service users can no longer change compensation data they are not
allowed to see.
Signed-off-by: Sanjiv Kumar Bhagat <reach.sanjiv.bhagat@gmail.com>
* Update card.php
* Update salary edit permissions logic
---------
Signed-off-by: Sanjiv Kumar Bhagat <reach.sanjiv.bhagat@gmail.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
# Qual: Update LanguageOfCommentsSniff to avoid PHP7 incompatibility
Variable length negative lookbehind is not available on older PHP version, used in Travis CI.
Updated the regex to use only negative lookahead.
* Qual: Generate phan specific changed php files list
# Qual: Generate phan specific changed php files list
Uses multiple parts of the Phan configuration to select and exclude files
for phan analysis.
* avoid catching special characters in regexes as indicators of french
* Qual: Translate french to english
* Fix: mass createbills success message showed draft PROV ref instead of final ref
Extended description (corps de la PR)
When creating an invoice from several orders at once via the order list
mass action ("Create invoice for this customer"), with the "Validate
generated invoices" option set to "yes", the success message and its link
displayed the temporary draft reference (PROVxxxx) instead of the final
validated invoice reference.
Root cause:
In htdocs/commande/list.php, during the confirm_createbills action, $lastref
is captured right after $objecttmp->create($user), at which point the invoice
is still a draft (PROVxxxx). When the "validate invoices" option is enabled,
each invoice is then validated through $objecttmp->validate($user), which
assigns the definitive reference to the object. However $lastref was never
refreshed afterwards, so the "BillXCreated" message (single-invoice case) kept
showing the draft ref.
Fix:
Refresh $lastref from the object inside the validation loop, after a successful
validate(), so the success message links to and displays the final reference.
Only the single-invoice success message exposes a reference, so this is the only
case affected; the multi-invoice message only shows a counter.
Steps to reproduce:
1. Go to the orders list.
2. Select several orders (or one), and choose the "Create invoice for this
customer" mass action.
3. Set "Validate generated invoices" to "Yes".
4. Confirm.
=> Before: the success message links to the draft ref PROVxxxx.
=> After: the success message links to the final validated invoice ref.
* Fix indent
* don't take care of some french comments
* Update LanguageOfCommentsSniff.php
* test a file
* Update doc_generic_asset_odt.modules.php
* Update auxaccount.php
* FIX: Translate French code comments to English in societe module
* fix phan
* fix phan