Fix permission
This commit is contained in:
parent
facf594b2d
commit
fa4786a3f6
@ -182,7 +182,7 @@ if ($id > 0) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'member';
|
||||
$permission = $user->rights->adherent->creer;
|
||||
$permissiontoadd = $user->rights->adherent->creer;
|
||||
$permtoedit = $user->rights->adherent->creer;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -128,7 +128,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'asset';
|
||||
$permission = $user->rights->asset->write;
|
||||
$permissiontoadd = $user->rights->asset->write;
|
||||
$permtoedit = $user->rights->asset->write;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -147,7 +147,7 @@ if ($object->id) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'bom';
|
||||
$permission = $user->rights->bom->write;
|
||||
$permissiontoadd = $user->rights->bom->write;
|
||||
$permtoedit = $user->rights->bom->write;
|
||||
$param = '&id='.$object->id;
|
||||
|
||||
|
||||
@ -287,7 +287,7 @@ if ($object->id > 0) {
|
||||
|
||||
|
||||
$modulepart = 'actions';
|
||||
$permission = $user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create;
|
||||
$permissiontoadd = $user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
} else {
|
||||
|
||||
@ -189,7 +189,7 @@ if ($object->id > 0) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'propal';
|
||||
$permission = $user->rights->propal->creer;
|
||||
$permissiontoadd = $user->rights->propal->creer;
|
||||
$permtoedit = $user->rights->propal->creer;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -184,7 +184,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'commande';
|
||||
$permission = $user->rights->commande->creer;
|
||||
$permissiontoadd = $user->rights->commande->creer;
|
||||
$permtoedit = $user->rights->commande->creer;
|
||||
$param = '&id='.$object->id.'&entity='.(!empty($object->entity) ? $object->entity : $conf->entity);
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -183,7 +183,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
|
||||
|
||||
$modulepart = 'bank';
|
||||
$permission = $user->rights->banque->modifier;
|
||||
$permissiontoadd = $user->rights->banque->modifier;
|
||||
$permtoedit = $user->rights->banque->modifier;
|
||||
$param = '&id='.$object->id.'&num='.urlencode($numref);
|
||||
$moreparam = '&num='.urlencode($numref);
|
||||
|
||||
@ -136,7 +136,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
|
||||
|
||||
$modulepart = 'bank';
|
||||
$permission = $user->rights->banque->modifier;
|
||||
$permissiontoadd = $user->rights->banque->modifier;
|
||||
$permtoedit = $user->rights->banque->modifier;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -150,7 +150,7 @@ if ($object->id) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'banque';
|
||||
$permission = $user->rights->banque->modifier;
|
||||
$permissiontoadd = $user->rights->banque->modifier;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
} else {
|
||||
|
||||
@ -126,7 +126,7 @@ if ($object->id) {
|
||||
print '</div>';
|
||||
|
||||
$modulepart = 'deplacement';
|
||||
$permission = $user->rights->deplacement->creer;
|
||||
$permissiontoadd = $user->rights->deplacement->creer;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
} else {
|
||||
|
||||
@ -181,7 +181,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'facture';
|
||||
$permission = $user->rights->facture->creer;
|
||||
$permissiontoadd = $user->rights->facture->creer;
|
||||
$permtoedit = $user->rights->facture->creer;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -164,7 +164,7 @@ if ($object->id) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'tax';
|
||||
$permission = $user->rights->tax->charges->creer;
|
||||
$permissiontoadd = $user->rights->tax->charges->creer;
|
||||
$permtoedit = $user->rights->tax->charges->creer;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -150,7 +150,7 @@ if ($object->id) {
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$permission = $user->rights->tax->charges->creer;
|
||||
$permissiontoadd = $user->rights->tax->charges->creer;
|
||||
$permtoedit = $user->rights->tax->charges->creer;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -182,7 +182,7 @@ if ($object->id) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'contact';
|
||||
$permission = $user->rights->societe->contact->creer;
|
||||
$permissiontoadd = $user->rights->societe->contact->creer;
|
||||
$permtoedit = $user->rights->societe->contact->creer;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -192,7 +192,7 @@ if ($object->id) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'contract';
|
||||
$permission = $user->rights->contrat->creer;
|
||||
$permissiontoadd = $user->rights->contrat->creer;
|
||||
$permtoedit = $user->rights->contrat->creer;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -188,7 +188,7 @@ if ($object->id) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'don';
|
||||
$permission = $user->rights->don->creer;
|
||||
$permissiontoadd = $user->rights->don->creer;
|
||||
$permtoedit = $user->rights->don->creer;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -177,7 +177,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'expedition';
|
||||
$permission = $user->rights->expedition->creer;
|
||||
$permissiontoadd = $user->rights->expedition->creer;
|
||||
$permtoedit = $user->rights->expedition->creer;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -154,7 +154,7 @@ if ($object->id) {
|
||||
|
||||
|
||||
$modulepart = 'expensereport';
|
||||
$permission = $user->rights->expensereport->creer;
|
||||
$permissiontoadd = $user->rights->expensereport->creer;
|
||||
$permtoedit = $user->rights->expensereport->creer;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -170,7 +170,7 @@ if ($object->id) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'ficheinter';
|
||||
$permission = $user->rights->ficheinter->creer;
|
||||
$permissiontoadd = $user->rights->ficheinter->creer;
|
||||
$permtoedit = $user->rights->ficheinter->creer;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -178,7 +178,7 @@ if ($object->id > 0) {
|
||||
|
||||
|
||||
$modulepart = 'commande_fournisseur';
|
||||
$permission = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer);
|
||||
$permissiontoadd = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer);
|
||||
$permtoedit = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer);
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -349,7 +349,7 @@ if ($object->id) {
|
||||
|
||||
|
||||
$modulepart = 'holiday';
|
||||
$permission = $user->rights->holiday->write;
|
||||
$permissiontoadd = $user->rights->holiday->write;
|
||||
$permtoedit = $user->rights->holiday->write;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -160,7 +160,7 @@ if ($object->id) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'loan';
|
||||
$permission = $user->rights->loan->write;
|
||||
$permissiontoadd = $user->rights->loan->write;
|
||||
$permtoedit = $user->rights->loan->write;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -233,8 +233,8 @@ if ($object->id) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'mymodule';
|
||||
//$permission = $user->rights->mymodule->myobject->write;
|
||||
$permission = 1;
|
||||
//$permissiontoadd = $user->rights->mymodule->myobject->write;
|
||||
$permissiontoadd = 1;
|
||||
//$permtoedit = $user->rights->mymodule->myobject->write;
|
||||
$permtoedit = 1;
|
||||
$param = '&id='.$object->id;
|
||||
|
||||
@ -179,7 +179,7 @@ if ($object->id) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'mrp';
|
||||
$permission = $user->rights->mrp->write;
|
||||
$permissiontoadd = $user->rights->mrp->write;
|
||||
$permtoedit = $user->rights->mrp->write;
|
||||
$param = '&id='.$object->id;
|
||||
|
||||
|
||||
@ -193,7 +193,6 @@ if ($object->id) {
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$permission = ($user->rights->produit->creer);
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
} else {
|
||||
|
||||
@ -165,7 +165,7 @@ if ($object->id > 0) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'project';
|
||||
$permission = ($userWrite > 0);
|
||||
$permissiontoadd = ($userWrite > 0);
|
||||
$permtoedit = ($userWrite > 0);
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
} else {
|
||||
|
||||
@ -324,7 +324,7 @@ if ($object->id > 0) {
|
||||
$param .= '&withproject=1';
|
||||
}
|
||||
$modulepart = 'project_task';
|
||||
$permission = $user->rights->projet->creer;
|
||||
$permissiontoadd = $user->rights->projet->creer;
|
||||
$permtoedit = $user->rights->projet->creer;
|
||||
$relativepathwithnofile = dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($object->ref).'/';
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -212,7 +212,7 @@ if ($object->id) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'recruitment';
|
||||
$permission = $user->rights->recruitment->recruitmentjobposition->write;
|
||||
$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write;
|
||||
$permtoedit = $user->rights->recruitment->recruitmentjobposition->write;
|
||||
$param = '&id='.$object->id;
|
||||
|
||||
|
||||
@ -211,7 +211,7 @@ if ($object->id) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'recruitment';
|
||||
$permission = $user->rights->recruitment->recruitmentjobposition->write;
|
||||
$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write;
|
||||
$permtoedit = $user->rights->recruitment->recruitmentjobposition->write;
|
||||
$param = '&id='.$object->id;
|
||||
|
||||
|
||||
@ -139,7 +139,7 @@ if ($object->id > 0) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'dolresource';
|
||||
$permission = $user->rights->resource->write;
|
||||
$permissiontoadd = $user->rights->resource->write;
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
} else {
|
||||
|
||||
@ -149,7 +149,7 @@ if ($object->id) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'salaries';
|
||||
$permission = $user->rights->salaries->write;
|
||||
$permissiontoadd = $user->rights->salaries->write;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
} else {
|
||||
|
||||
@ -176,7 +176,7 @@ if ($object->id) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'societe';
|
||||
$permission = $user->rights->societe->creer;
|
||||
$permissiontoadd = $user->rights->societe->creer;
|
||||
$permtoedit = $user->rights->societe->creer;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -163,7 +163,7 @@ if ($object->id > 0) {
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'supplier_proposal';
|
||||
$permission = $user->rights->supplier_proposal->creer;
|
||||
$permissiontoadd = $user->rights->supplier_proposal->creer;
|
||||
$permtoedit = $user->rights->supplier_proposal->creer;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
@ -203,7 +203,7 @@ if ($object->id) {
|
||||
|
||||
//$object->ref = $object->track_id; // For compatibility we use track ID for directory
|
||||
$modulepart = 'ticket';
|
||||
$permission = $user->rights->ticket->write;
|
||||
$permissiontoadd = $user->rights->ticket->write;
|
||||
$permtoedit = $user->rights->ticket->write;
|
||||
$param = '&id='.$object->id;
|
||||
|
||||
|
||||
@ -176,7 +176,7 @@ if ($object->id) {
|
||||
|
||||
|
||||
$modulepart = 'user';
|
||||
$permission = $user->rights->user->user->creer;
|
||||
$permissiontoadd = $user->rights->user->user->creer;
|
||||
$permtoedit = $user->rights->user->user->creer;
|
||||
$param = '&id='.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user