|
@@ -100,11 +100,6 @@ if (empty($action) && empty($id) && empty($ref)) $action = 'view';
|
|
|
// Load object
|
|
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
|
|
|
|
|
-// Security check - Protection if external user
|
|
|
-//if ($user->socid > 0) accessforbidden();
|
|
|
-//if ($user->socid > 0) $socid = $user->socid;
|
|
|
-//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0);
|
|
|
-//$result = restrictedArea($user, 'mymodule', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
|
|
|
|
|
$permissiontoread = $user->rights->mymodule->myobject->read;
|
|
|
$permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
|
@@ -113,6 +108,14 @@ $permissionnote = $user->rights->mymodule->myobject->write; // Used by the inclu
|
|
|
$permissiondellink = $user->rights->mymodule->myobject->write; // Used by the include of actions_dellink.inc.php
|
|
|
$upload_dir = $conf->mymodule->multidir_output[isset($object->entity) ? $object->entity : 1];
|
|
|
|
|
|
+// Security check - Protection if external user
|
|
|
+//if ($user->socid > 0) accessforbidden();
|
|
|
+//if ($user->socid > 0) $socid = $user->socid;
|
|
|
+//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0);
|
|
|
+//$result = restrictedArea($user, 'mymodule', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
|
|
+
|
|
|
+//if (!$permissiontoread) accessforbidden();
|
|
|
+
|
|
|
|
|
|
/*
|
|
|
* Actions
|