Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
This commit is contained in:
parent
6c0d1e7a54
commit
79099bd090
@ -92,7 +92,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
//if ($user->socid > 0) accessforbidden();
|
//if ($user->socid > 0) accessforbidden();
|
||||||
//if ($user->socid > 0) $socid = $user->socid;
|
//if ($user->socid > 0) $socid = $user->socid;
|
||||||
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||||
restrictedArea($user, 'bom', $object->id, 'bom_bom', '', '', 'rowid', $isdraft);
|
restrictedArea($user, 'bom', $object->id, $object->table_element, '', '', 'rowid', $isdraft);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -84,7 +84,7 @@ if ($object->id > 0) {
|
|||||||
//if ($user->socid > 0) accessforbidden();
|
//if ($user->socid > 0) accessforbidden();
|
||||||
//if ($user->socid > 0) $socid = $user->socid;
|
//if ($user->socid > 0) $socid = $user->socid;
|
||||||
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||||
$result = restrictedArea($user, 'bom', $object->id, 'bom_bom', '', '', 'rowid', $isdraft);
|
$result = restrictedArea($user, 'bom', $object->id, $object->table_element, '', '', 'rowid', $isdraft);
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
$permissionnote = $user->hasRight('bom', 'write'); // Used by the include of actions_setnotes.inc.php
|
$permissionnote = $user->hasRight('bom', 'write'); // Used by the include of actions_setnotes.inc.php
|
||||||
|
|||||||
@ -83,7 +83,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
//if ($user->socid > 0) accessforbidden();
|
//if ($user->socid > 0) accessforbidden();
|
||||||
//if ($user->socid > 0) $socid = $user->socid;
|
//if ($user->socid > 0) $socid = $user->socid;
|
||||||
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||||
restrictedArea($user, 'bom', $object->id, 'bom_bom', '', '', 'rowid', $isdraft);
|
restrictedArea($user, 'bom', $object->id, $object->table_element, '', '', 'rowid', $isdraft);
|
||||||
|
|
||||||
$permissiontoadd = $user->hasRight('bom', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php
|
$permissiontoadd = $user->hasRight('bom', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php
|
||||||
|
|
||||||
|
|||||||
@ -81,7 +81,7 @@ if ($object->id > 0) {
|
|||||||
//if ($user->socid > 0) accessforbidden();
|
//if ($user->socid > 0) accessforbidden();
|
||||||
//if ($user->socid > 0) $socid = $user->socid;
|
//if ($user->socid > 0) $socid = $user->socid;
|
||||||
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||||
$result = restrictedArea($user, 'bom', $object->id, 'bom_bom', '', '', 'rowid', $isdraft);
|
$result = restrictedArea($user, 'bom', $object->id, $object->table_element, '', '', 'rowid', $isdraft);
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
$permissionnote = $user->hasRight('bom', 'write'); // Used by the include of actions_setnotes.inc.php
|
$permissionnote = $user->hasRight('bom', 'write'); // Used by the include of actions_setnotes.inc.php
|
||||||
|
|||||||
@ -67,7 +67,7 @@ $permissionnote = $user->hasRight('bom', 'write'); // Used by the include of act
|
|||||||
//if ($user->socid > 0) accessforbidden();
|
//if ($user->socid > 0) accessforbidden();
|
||||||
//if ($user->socid > 0) $socid = $user->socid;
|
//if ($user->socid > 0) $socid = $user->socid;
|
||||||
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||||
restrictedArea($user, 'bom', $object->id, 'bom_bom', '', '', 'rowid', $isdraft);
|
restrictedArea($user, 'bom', $object->id, $object->table_element, '', '', 'rowid', $isdraft);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -46,6 +46,13 @@ require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
|
|||||||
$idbom = GETPOST('idbom', 'alpha');
|
$idbom = GETPOST('idbom', 'alpha');
|
||||||
//$action = GETPOST('action', 'aZ09');
|
//$action = GETPOST('action', 'aZ09');
|
||||||
|
|
||||||
|
$object = new BOM($db);
|
||||||
|
$result = $object->fetch($idbom);
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||||
|
$result = restrictedArea($user, 'bom', $object, $object->table_element, '', '', 'rowid', $isdraft);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -53,8 +60,6 @@ $idbom = GETPOST('idbom', 'alpha');
|
|||||||
|
|
||||||
top_httphead('application/json');
|
top_httphead('application/json');
|
||||||
|
|
||||||
$object = new BOM($db);
|
|
||||||
$result = $object->fetch($idbom);
|
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
// We remove properties we don't need in answer
|
// We remove properties we don't need in answer
|
||||||
unset($object->fields);
|
unset($object->fields);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user