Merge pull request #22105 from dolibit-ut/patch-518

Update conferenceorboothattendee_card.php
This commit is contained in:
Laurent Destailleur 2022-09-07 13:07:51 +02:00 committed by GitHub
commit 40450800d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,20 +16,23 @@
*/
/**
* \file conferenceorboothattendee_card.php
* \ingroup eventorganization
* \brief Page to create/edit/view conferenceorboothattendee
* \file htdocs/eventorganization/conferenceorboothattendee_card.php
* \ingroup eventorganization
* \brief Page to create/edit/view conferenceorboothattendee
*/
// Load Dolibarr environment
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php';
require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
// Load translation files required by the page
@ -108,6 +111,7 @@ if ($object->fk_project > 0) {
$fk_project = $object->fk_project;
}
// Permissions
$permissiontoread = $user->rights->eventorganization->read;
$permissiontoadd = $user->rights->eventorganization->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
$permissiontodelete = $user->rights->eventorganization->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);