Skip to content

Commit 9d307a4

Browse files
committed
Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0
2 parents f4bcf47 + 222cd76 commit 9d307a4

File tree

12 files changed

+49
-34
lines changed

12 files changed

+49
-34
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "CI-RELEASE"
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
trigger-docker:
9+
steps:
10+
- name: Generate a token
11+
id: generate-token
12+
uses: actions/create-github-app-token@v2
13+
with:
14+
app-id: ${{ vars.RELEASE_DOCKER_ID }}
15+
private-key: ${{ secrets.RELEASE_DOCKER_SECRET }}
16+
17+
- uses: peter-evans/repository-dispatch@v4
18+
with:
19+
token: ${{ steps.generate-token.outputs.token }}
20+
repository: Dolibarr/dolibarr-docker
21+
event-type: new-release
22+
client-payload: '{"version": "${{ github.event.release.tag_name }}"}'

htdocs/compta/facture/card.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6003,7 +6003,6 @@ function js_recalculate_revenuestamp(){
60036003
// For situation invoice with excess received
60046004
if ($object->status > Facture::STATUS_DRAFT
60056005
&& $object->type == Facture::TYPE_SITUATION
6006-
&& ($object->total_ttc - $totalpaid - $totalcreditnotes - $totaldeposits) > 0
60076006
&& $usercancreate
60086007
&& !$objectidnext
60096008
&& $object->is_last_in_cycle()

htdocs/core/actions_addupdatedelete.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@
396396

397397
$object->oldcopy = dol_clone($object, 2);
398398

399-
$attribute = GETPOST('attribute', 'alphanohtml');
399+
$attribute = GETPOST('attribute', 'aZ09');
400400

401401
$error = 0;
402402

htdocs/core/lib/functions.lib.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14648,8 +14648,8 @@ function GETPOSTDATE($prefix, $hourTime = '', $gm = 'auto')
1464814648
$m = array();
1464914649
if ($hourTime === 'getpost') {
1465014650
$hour = GETPOSTINT($prefix . 'hour');
14651-
$minute = GETPOSTINT($prefix . 'minute');
14652-
$second = GETPOSTINT($prefix . 'second');
14651+
$minute = GETPOSTINT($prefix . 'min');
14652+
$second = GETPOSTINT($prefix . 'sec');
1465314653
} elseif (preg_match('/^(\d\d):(\d\d):(\d\d)$/', $hourTime, $m)) {
1465414654
$hour = intval($m[1]);
1465514655
$minute = intval($m[2]);
@@ -14688,8 +14688,8 @@ function buildParamDate($prefix, $timestamp = null, $hourTime = '', $gm = 'auto'
1468814688
if ($hourTime === 'getpost' || ($timestamp !== null && dol_print_date($timestamp, '%H:%M:%S') !== '00:00:00')) {
1468914689
$TParam = array_merge($TParam, array(
1469014690
$prefix . 'hour' => intval(dol_print_date($timestamp, '%H')),
14691-
$prefix . 'minute' => intval(dol_print_date($timestamp, '%M')),
14692-
$prefix . 'second' => intval(dol_print_date($timestamp, '%S'))
14691+
$prefix . 'min' => intval(dol_print_date($timestamp, '%M')),
14692+
$prefix . 'sec' => intval(dol_print_date($timestamp, '%S'))
1469314693
));
1469414694
}
1469514695

htdocs/core/lib/security.lib.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -910,14 +910,14 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl
910910
$checkonentitydone = 0;
911911

912912
// Array to define rules of checks to do
913-
$check = array('adherent', 'banque', 'bom', 'don', 'mrp', 'user', 'usergroup', 'payment', 'payment_supplier', 'payment_sc', 'product', 'produit', 'service', 'produit|service', 'categorie', 'resource', 'expensereport', 'holiday', 'salaries', 'website', 'recruitment', 'chargesociales', 'knowledgemanagement'); // Test on entity only (Objects with no link to company)
913+
$check = array('adherent', 'banque', 'bom', 'don', 'mrp', 'user', 'usergroup', 'payment', 'payment_supplier', 'payment_sc', 'product', 'produit', 'service', 'produit|service', 'categorie', 'resource', 'expensereport', 'holiday', 'salaries', 'website', 'recruitment', 'chargesociales', 'knowledgemanagement', 'stock'); // Test on entity only (Objects with no link to company)
914914
$checksoc = array('societe'); // Test for object Societe
915915
$checkparentsoc = array('agenda', 'contact', 'contrat'); // Test on entity + link to third party on field $dbt_keyfield. Allowed if link is empty (Ex: contacts...).
916916
$checkproject = array('projet', 'project'); // Test for project object
917917
$checktask = array('projet_task', 'project_task'); // Test for task object
918918
$checkhierarchy = array('expensereport', 'holiday', 'hrm'); // check permission among the hierarchy of user
919919
$checkuser = array('bookmark'); // check permission among the fk_user (must be myself or null)
920-
$nocheck = array('barcode', 'stock'); // No test
920+
$nocheck = array('barcode'); // No test
921921

922922
//$checkdefault = 'all other not already defined'; // Test on entity + link to third party on field $dbt_keyfield. Not allowed if link is empty (Ex: invoice, orders...).
923923

htdocs/hrm/evaluation_agenda.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@
9696
// Security check (enable the most restrictive one)
9797
//if ($user->socid > 0) accessforbidden();
9898
//if ($user->socid > 0) $socid = $user->socid;
99-
//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
100-
//restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, 'fk_soc', 'rowid', $isdraft);
99+
$isdraft = $object->status == Evaluation::STATUS_DRAFT ? 1 : 0;
100+
restrictedArea($user, $object->element, $object, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
101+
101102
if (!isModEnabled('hrm')) {
102103
accessforbidden();
103104
}

htdocs/hrm/evaluation_contact.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,8 @@
6262
// Security check (enable the most restrictive one)
6363
//if ($user->socid > 0) accessforbidden();
6464
//if ($user->socid > 0) $socid = $user->socid;
65-
//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
66-
//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
67-
//if (empty($conf->hrm->enabled)) accessforbidden();
68-
//if (!$permissiontoread) accessforbidden();
65+
$isdraft = $object->status == Evaluation::STATUS_DRAFT ? 1 : 0;
66+
restrictedArea($user, $object->element, $object, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
6967

7068

7169

htdocs/hrm/evaluation_document.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,12 @@
8585
$permissiontoread = $user->hasRight('hrm', 'evaluation', 'read');
8686

8787
// Security check (enable the most restrictive one)
88-
//if ($user->socid > 0) accessforbidden();
89-
//if ($user->socid > 0) $socid = $user->socid;
90-
//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
91-
//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
92-
if (empty($conf->hrm->enabled)) {
93-
accessforbidden();
94-
}
95-
if (!$permissiontoread) {
96-
accessforbidden();
97-
}
88+
89+
$isdraft = $object->status == Evaluation::STATUS_DRAFT ? 1 : 0;
90+
restrictedArea($user, $object->element, $object, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
91+
92+
if (!isModEnabled('hrm')) accessforbidden();
93+
if (!$permissiontoread) accessforbidden();
9894

9995

10096
/*

htdocs/hrm/evaluation_note.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@
6666
// Security check (enable the most restrictive one)
6767
//if ($user->socid > 0) accessforbidden();
6868
//if ($user->socid > 0) $socid = $user->socid;
69-
//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
70-
//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
71-
//if (empty($conf->hrm->enabled)) accessforbidden();
72-
//if (!$permissiontoread) accessforbidden();
69+
$isdraft = (($object->status == Evaluation::STATUS_DRAFT) ? 1 : 0);
70+
restrictedArea($user, $object->element, $object, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
71+
if (empty($conf->hrm->enabled)) accessforbidden();
72+
if (!$permissiontoread) accessforbidden();
7373

7474

7575
/*

htdocs/product/inventory/card.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
$include_sub_warehouse = !empty(GETPOST('include_sub_warehouse')) ? GETPOST('include_sub_warehouse') : 0;
4444

4545
if (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS')) {
46-
$result = restrictedArea($user, 'stock', $id);
46+
$result = restrictedArea($user, 'stock', $id, 'inventory&stock');
4747
} else {
48-
$result = restrictedArea($user, 'stock', $id, '', 'inventory_advance');
48+
$result = restrictedArea($user, 'stock', $id, 'inventory&stock', 'inventory_advance');
4949
}
5050

5151
// Initialize technical objects

0 commit comments

Comments
 (0)