Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
3d9abb5dcd
30 changed files with 89 additions and 89 deletions
|
|
@ -152,7 +152,7 @@ if (empty($reshook) && $action == 'confirm_create_thirdparty' && $confirm == 'ye
|
|||
}
|
||||
}
|
||||
|
||||
if (empty($reshook) && $action == 'setuserid' && ($user->rights->user->self->creer || $user->hasRight('user', 'user', 'creer'))) {
|
||||
if (empty($reshook) && $action == 'setuserid' && ($user->hasRight('user', 'self', 'creer') || $user->hasRight('user', 'user', 'creer'))) {
|
||||
$error = 0;
|
||||
if (!$user->hasRight('user', 'user', 'creer')) { // If can edit only itself user, we can link to itself only
|
||||
if (GETPOST("userid", 'int') != $user->id && GETPOST("userid", 'int') != $object->user_id) {
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ $elementList['user'] = img_picto('', 'user', 'class="pictofixedwidth"').dol_esca
|
|||
if (isModEnabled('adherent') && $user->hasRight('adherent', 'lire')) {
|
||||
$elementList['member'] = img_picto('', 'object_member', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToMember'));
|
||||
}
|
||||
if (isModEnabled('recruitment') && !empty($user->rights->recruitment->recruitmentjobposition->read)) {
|
||||
if (isModEnabled('recruitment') && $user->hasRight('recruitment', 'recruitmentjobposition', 'read')) {
|
||||
$elementList['recruitmentcandidature_send'] = img_picto('', 'recruitmentcandidature', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('RecruitmentCandidatures'));
|
||||
}
|
||||
if (isModEnabled("societe") && $user->hasRight('societe', 'lire')) {
|
||||
|
|
|
|||
|
|
@ -911,7 +911,7 @@ if ($type == Categorie::TYPE_ACCOUNT) {
|
|||
if ($user->hasRight("banque", "read")) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
|
||||
$permission = $user->rights->banque->creer;
|
||||
$permission = $user->hasRight('banque', 'creer');
|
||||
|
||||
$accounts = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
||||
if ($accounts < 0) {
|
||||
|
|
@ -1127,7 +1127,7 @@ if ($type == Categorie::TYPE_USER) {
|
|||
|
||||
// Link to delete from category
|
||||
print '<td class="right">';
|
||||
if ($user->rights->user->user->creer) {
|
||||
if ($user->hasRight('user', 'user', 'creer')) {
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid) ? 'id' : 'socid')."=".$object->id."&type=".$type."&action=unlink&token=".newToken()."&removeelem=".$userentry->id."'>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft');
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ if (empty($reshook)) {
|
|||
$objectclass = 'Account';
|
||||
$objectlabel = 'BankTransaction';
|
||||
$permissiontoread = !empty($user->rights->banque->lire);
|
||||
$permissiontodelete = !empty($user->rights->banque->modifier);
|
||||
$permissiontodelete = $user->hasRight('banque', 'modifier');
|
||||
$uploaddir = $conf->bank->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
}
|
||||
|
|
@ -328,7 +328,7 @@ if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', '
|
|||
}
|
||||
|
||||
|
||||
if (GETPOST('save') && !$cancel && !empty($user->rights->banque->modifier)) {
|
||||
if (GETPOST('save') && !$cancel && $user->hasRight('banque', 'modifier')) {
|
||||
$error = 0;
|
||||
|
||||
if (price2num(GETPOST("addcredit")) > 0) {
|
||||
|
|
@ -388,7 +388,7 @@ if (GETPOST('save') && !$cancel && !empty($user->rights->banque->modifier)) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($action == 'confirm_delete' && $confirm == 'yes' && !empty($user->rights->banque->modifier)) {
|
||||
if ($action == 'confirm_delete' && $confirm == 'yes' && $user->hasRight('banque', 'modifier')) {
|
||||
$accline = new AccountLine($db);
|
||||
$result = $accline->fetch(GETPOST("rowid", "int"));
|
||||
$result = $accline->delete($user);
|
||||
|
|
@ -885,7 +885,7 @@ if ($resql) {
|
|||
}
|
||||
|
||||
// Form to add a transaction with no invoice
|
||||
if (!empty($user->rights->banque->modifier) && $action == 'addline' && !empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) {
|
||||
if ($user->hasRight('banque', 'modifier') && $action == 'addline' && !empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) {
|
||||
print load_fiche_titre($langs->trans("AddBankRecordLong"), '', '');
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class box_accountancy_last_manual_entries extends ModeleBoxes
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->hidden = empty($user->rights->accounting->mouvements->lire);
|
||||
$this->hidden = !$user->hasRight('accounting', 'mouvements', 'lire');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class box_accountancy_suspense_account extends ModeleBoxes
|
|||
|
||||
$this->db = $db;
|
||||
|
||||
$this->hidden = empty($user->rights->accounting->mouvements->lire);
|
||||
$this->hidden = !$user->hasRight('accounting', 'mouvements', 'lire');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ class Utils
|
|||
}
|
||||
|
||||
// Recreate temp dir that are not automatically recreated by core code for performance purpose, we need them
|
||||
if (!empty($conf->api->enabled)) {
|
||||
if (isModEnabled('api')) {
|
||||
dol_mkdir($conf->api->dir_temp);
|
||||
}
|
||||
dol_mkdir($conf->user->dir_temp);
|
||||
|
|
|
|||
|
|
@ -3150,7 +3150,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
|||
$original_file = $conf->import->dir_temp.'/'.$original_file;
|
||||
} elseif ($modulepart == 'recruitment' && !empty($conf->recruitment->dir_output)) {
|
||||
// Wrapping for recruitment module
|
||||
$accessallowed = $user->rights->recruitment->recruitmentjobposition->read;
|
||||
$accessallowed = $user->hasRight('recruitment', 'recruitmentjobposition', 'read');
|
||||
$original_file = $conf->recruitment->dir_output.'/'.$original_file;
|
||||
} elseif ($modulepart == 'editor' && !empty($conf->fckeditor->dir_output)) {
|
||||
// Wrapping for wysiwyg editor
|
||||
|
|
|
|||
|
|
@ -595,7 +595,7 @@ function restrictedArea(User $user, $features, $object = 0, $tableandshare = '',
|
|||
$nbko++;
|
||||
}
|
||||
} elseif ($feature == 'banque') {
|
||||
if (empty($user->rights->banque->modifier)) {
|
||||
if (!$user->hasRight('banque', 'modifier')) {
|
||||
$createok = 0;
|
||||
$nbko++;
|
||||
}
|
||||
|
|
@ -666,7 +666,7 @@ function restrictedArea(User $user, $features, $object = 0, $tableandshare = '',
|
|||
// Check create user permission
|
||||
$createuserok = 1;
|
||||
if (GETPOST('action', 'aZ09') == 'confirm_create_user' && GETPOST("confirm", 'aZ09') == 'yes') {
|
||||
if (!$user->rights->user->user->creer) {
|
||||
if (!$user->hasRight('user', 'user', 'creer')) {
|
||||
$createuserok = 0;
|
||||
}
|
||||
|
||||
|
|
@ -716,7 +716,7 @@ function restrictedArea(User $user, $features, $object = 0, $tableandshare = '',
|
|||
$deleteok = 0;
|
||||
}
|
||||
} elseif ($feature == 'banque') {
|
||||
if (empty($user->rights->banque->modifier)) {
|
||||
if (!$user->hasRight('banque', 'modifier')) {
|
||||
$deleteok = 0;
|
||||
}
|
||||
} elseif ($feature == 'cheque') {
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ class modRecruitment extends DolibarrModules
|
|||
'langs'=>'recruitment', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>1000 + $r,
|
||||
'enabled'=>'$conf->recruitment->enabled', // Define condition to show or hide menu entry. Use '$conf->recruitment->enabled' if entry must be visible if module is enabled.
|
||||
'perms'=>'$user->rights->recruitment->recruitmentjobposition->read', // Use 'perms'=>'$user->rights->recruitment->level1->level2' if you want your menu with a permission rules
|
||||
'perms'=>'$user->hasRight("recruitment", "recruitmentjobposition", "read")', // Use 'perms'=>'$user->rights->recruitment->level1->level2' if you want your menu with a permission rules
|
||||
'target'=>'',
|
||||
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
|
||||
);
|
||||
|
|
@ -293,7 +293,7 @@ class modRecruitment extends DolibarrModules
|
|||
'langs'=>'recruitment', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>1000 + $r,
|
||||
'enabled'=>'$conf->recruitment->enabled', // Define condition to show or hide menu entry. Use '$conf->recruitment->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'perms'=>'$user->rights->recruitment->recruitmentjobposition->read', // Use 'perms'=>'$user->rights->recruitment->level1->level2' if you want your menu with a permission rules
|
||||
'perms'=>'$user->hasRight("recruitment", "recruitmentjobposition", "read")', // Use 'perms'=>'$user->rights->recruitment->level1->level2' if you want your menu with a permission rules
|
||||
'target'=>'',
|
||||
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
|
||||
);
|
||||
|
|
@ -321,7 +321,7 @@ class modRecruitment extends DolibarrModules
|
|||
'langs'=>'recruitment', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>1000 + $r,
|
||||
'enabled'=>'$conf->recruitment->enabled', // Define condition to show or hide menu entry. Use '$conf->recruitment->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'perms'=>'$user->rights->recruitment->recruitmentjobposition->read', // Use 'perms'=>'$user->rights->recruitment->level1->level2' if you want your menu with a permission rules
|
||||
'perms'=>'$user->hasRight("recruitment", "recruitmentjobposition", "read")', // Use 'perms'=>'$user->rights->recruitment->level1->level2' if you want your menu with a permission rules
|
||||
'target'=>'',
|
||||
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
|
||||
);
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ $arrayfields = array(
|
|||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
||||
|
||||
$canedituser = (!empty($user->admin) || $user->rights->user->user->creer);
|
||||
$canedituser = (!empty($user->admin) || $user->hasRight('user', 'user', 'creer'));
|
||||
|
||||
$objectuser = new User($db);
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class Recruitment extends DolibarrApi
|
|||
*/
|
||||
public function getJobPosition($id)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->rights->recruitment->recruitmentjobposition->read) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('recruitment', 'recruitmentjobposition', 'read')) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ class Recruitment extends DolibarrApi
|
|||
*/
|
||||
public function getCandidature($id)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->rights->recruitment->recruitmentjobposition->read) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('recruitment', 'recruitmentjobposition', 'read')) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
|
|
@ -147,7 +147,7 @@ class Recruitment extends DolibarrApi
|
|||
$obj_ret = array();
|
||||
$tmpobject = new RecruitmentJobPosition($this->db);
|
||||
|
||||
if (!DolibarrApiAccess::$user->rights->recruitment->recruitmentjobposition->read) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('recruitment', 'recruitmentjobposition', 'read')) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ class Recruitment extends DolibarrApi
|
|||
$obj_ret = array();
|
||||
$tmpobject = new RecruitmentCandidature($this->db);
|
||||
|
||||
if (!DolibarrApiAccess::$user->rights->recruitment->recruitmentjobposition->read) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('recruitment', 'recruitmentjobposition', 'read')) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
|
|
@ -350,7 +350,7 @@ class Recruitment extends DolibarrApi
|
|||
*/
|
||||
public function postJobPosition($request_data = null)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->rights->recruitment->recruitmentjobposition->write) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('recruitment', 'recruitmentjobposition', 'write')) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
|
|
@ -382,7 +382,7 @@ class Recruitment extends DolibarrApi
|
|||
*/
|
||||
public function postCandidature($request_data = null)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->rights->recruitment->recruitmentjobposition->write) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('recruitment', 'recruitmentjobposition', 'write')) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
|
|
@ -415,7 +415,7 @@ class Recruitment extends DolibarrApi
|
|||
*/
|
||||
public function putJobPosition($id, $request_data = null)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->rights->recruitment->recruitmentjobposition->write) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('recruitment', 'recruitmentjobposition', 'write')) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
|
|
@ -458,7 +458,7 @@ class Recruitment extends DolibarrApi
|
|||
*/
|
||||
public function putCandidature($id, $request_data = null)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->rights->recruitment->recruitmentjobposition->write) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('recruitment', 'recruitmentjobposition', 'write')) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
|
|
@ -501,7 +501,7 @@ class Recruitment extends DolibarrApi
|
|||
*/
|
||||
public function deleteJobPosition($id)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->rights->recruitment->recruitmentjobposition->delete) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('recruitment', 'recruitmentjobposition', 'delete')) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
$result = $this->jobposition->fetch($id);
|
||||
|
|
@ -537,7 +537,7 @@ class Recruitment extends DolibarrApi
|
|||
*/
|
||||
public function deleteCandidature($id)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->rights->recruitment->recruitmentjobposition->delete) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('recruitment', 'recruitmentjobposition', 'delete')) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
$result = $this->candidature->fetch($id);
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ class RecruitmentJobPosition extends CommonObject
|
|||
}
|
||||
|
||||
// Example to show how to set values of fields definition dynamically
|
||||
/*if ($user->rights->recruitment->recruitmentjobposition->read) {
|
||||
/*if ($user->hasRight('recruitment', 'recruitmentjobposition', 'read')) {
|
||||
$this->fields['myfield']['visible'] = 1;
|
||||
$this->fields['myfield']['noteditable'] = 0;
|
||||
}*/
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ $NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
|
|||
$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
|
||||
|
||||
// Last modified job position
|
||||
if (isModEnabled('recruitment') && $user->rights->recruitment->recruitmentjobposition->read) {
|
||||
if (isModEnabled('recruitment') && $user->hasRight('recruitment', 'recruitmentjobposition', 'read')) {
|
||||
$sql = "SELECT s.rowid, s.ref, s.label, s.date_creation, s.tms, s.status, COUNT(rc.rowid) as nbapplications";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as s";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc ON rc.fk_recruitmentjobposition = s.rowid";
|
||||
|
|
@ -404,7 +404,7 @@ if (isModEnabled('recruitment') && $user->rights->recruitment->recruitmentjobpos
|
|||
}
|
||||
|
||||
// Last modified job position
|
||||
if (isModEnabled('recruitment') && $user->rights->recruitment->recruitmentjobposition->read) {
|
||||
if (isModEnabled('recruitment') && $user->hasRight('recruitment', 'recruitmentjobposition', 'read')) {
|
||||
$sql = "SELECT rc.rowid, rc.ref, rc.email, rc.lastname, rc.firstname, rc.date_creation, rc.tms, rc.status";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as s ON rc.fk_recruitmentjobposition = s.rowid";
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
$upload_dir = $conf->recruitment->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id;
|
||||
}
|
||||
|
||||
$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
$permissiontoadd = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
// Security check - Protection if external user
|
||||
//if ($user->socid > 0) accessforbidden();
|
||||
|
|
|
|||
|
|
@ -73,11 +73,11 @@ if (empty($action) && empty($id) && empty($ref)) {
|
|||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||
|
||||
|
||||
$permissiontoread = $user->rights->recruitment->recruitmentjobposition->read;
|
||||
$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
$permissiontodelete = $user->rights->recruitment->recruitmentjobposition->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||
$permissionnote = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_dellink.inc.php
|
||||
$permissiontoread = $user->hasRight('recruitment', 'recruitmentjobposition', 'read');
|
||||
$permissiontoadd = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
$permissiontodelete = $user->hasRight('recruitment', 'recruitmentjobposition', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||
$permissionnote = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_dellink.inc.php
|
||||
$upload_dir = $conf->recruitment->multidir_output[isset($object->entity) ? $object->entity : 1];
|
||||
|
||||
// Security check - Protection if external user
|
||||
|
|
@ -579,7 +579,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
|
||||
// Button to convert into a user
|
||||
if ($object->status == $object::STATUS_CONTRACT_SIGNED) {
|
||||
if ($user->rights->user->user->creer) {
|
||||
if ($user->hasRight('user', 'user', 'creer')) {
|
||||
$useralreadyexists = $object->fk_user;
|
||||
if (empty($useralreadyexists)) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=create_user">'.$langs->trans("CreateDolibarrLogin").'</a></div>';
|
||||
|
|
@ -624,8 +624,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
$relativepath = $objref.'/'.$objref.'.pdf';
|
||||
$filedir = $conf->recruitment->dir_output.'/'.$object->element.'/'.$objref;
|
||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
$genallowed = $user->rights->recruitment->recruitmentjobposition->read; // If you can read, you can build the PDF to read content
|
||||
$delallowed = $user->rights->recruitment->recruitmentjobposition->write; // If you can create/edit, you can remove a file on card
|
||||
$genallowed = $user->hasRight('recruitment', 'recruitmentjobposition', 'read'); // If you can read, you can build the PDF to read content
|
||||
$delallowed = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // If you can create/edit, you can remove a file on card
|
||||
print $formfile->showdocuments('recruitment:RecruitmentCandidature', $object->element.'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||
$result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruitmentcandidature', 'recruitmentjobposition', '', 'rowid', $isdraft);
|
||||
|
||||
$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
$permissiontoadd = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
|
||||
|
||||
|
|
@ -182,8 +182,8 @@ if ($object->id) {
|
|||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'recruitment';
|
||||
$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write;
|
||||
$permtoedit = $user->rights->recruitment->recruitmentjobposition->write;
|
||||
$permissiontoadd = $user->hasRight('recruitment', 'recruitmentjobposition', 'write');
|
||||
$permtoedit = $user->hasRight('recruitment', 'recruitmentjobposition', 'write');
|
||||
$param = '&id='.$object->id;
|
||||
|
||||
$relativepathwithnofile = 'recruitmentcandidature/'.dol_sanitizeFileName($object->ref).'/';
|
||||
|
|
|
|||
|
|
@ -138,9 +138,9 @@ if ($id > 0 || !empty($ref)) {
|
|||
$object->fields = dol_sort_array($object->fields, 'position');
|
||||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
|
||||
$permissiontoread = $user->rights->recruitment->recruitmentjobposition->read;
|
||||
$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write;
|
||||
$permissiontodelete = $user->rights->recruitment->recruitmentjobposition->delete;
|
||||
$permissiontoread = $user->hasRight('recruitment', 'recruitmentjobposition', 'read');
|
||||
$permissiontoadd = $user->hasRight('recruitment', 'recruitmentjobposition', 'write');
|
||||
$permissiontodelete = $user->hasRight('recruitment', 'recruitmentjobposition', 'delete');
|
||||
|
||||
// Security check - Protection if external user
|
||||
//if ($user->socid > 0) accessforbidden();
|
||||
|
|
|
|||
|
|
@ -51,8 +51,8 @@ if ($id > 0 || !empty($ref)) {
|
|||
$upload_dir = $conf->recruitment->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id;
|
||||
}
|
||||
|
||||
$permissionnote = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
$permissionnote = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_setnotes.inc.php
|
||||
$permissiontoadd = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
// Security check - Protection if external user
|
||||
//if ($user->socid > 0) accessforbidden();
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
$upload_dir = $conf->recruitment->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id;
|
||||
}
|
||||
|
||||
$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
$permissiontoadd = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
// Security check - Protection if external user
|
||||
//if ($user->socid > 0) accessforbidden();
|
||||
|
|
|
|||
|
|
@ -72,11 +72,11 @@ if (empty($action) && empty($id) && empty($ref)) {
|
|||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||
|
||||
|
||||
$permissiontoread = $user->rights->recruitment->recruitmentjobposition->read;
|
||||
$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
$permissiontodelete = $user->rights->recruitment->recruitmentjobposition->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||
$permissionnote = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_dellink.inc.php
|
||||
$permissiontoread = $user->hasRight('recruitment', 'recruitmentjobposition', 'read');
|
||||
$permissiontoadd = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
$permissiontodelete = $user->hasRight('recruitment', 'recruitmentjobposition', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||
$permissionnote = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_dellink.inc.php
|
||||
$upload_dir = $conf->recruitment->multidir_output[isset($object->entity) ? $object->entity : 1];
|
||||
|
||||
// Security check - Protection if external user
|
||||
|
|
|
|||
|
|
@ -72,11 +72,11 @@ if (empty($action) && empty($id) && empty($ref)) {
|
|||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||
|
||||
|
||||
$permissiontoread = $user->rights->recruitment->recruitmentjobposition->read;
|
||||
$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
$permissiontodelete = $user->rights->recruitment->recruitmentjobposition->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||
$permissionnote = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_dellink.inc.php
|
||||
$permissiontoread = $user->hasRight('recruitment', 'recruitmentjobposition', 'read');
|
||||
$permissiontoadd = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
$permissiontodelete = $user->hasRight('recruitment', 'recruitmentjobposition', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||
$permissionnote = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_dellink.inc.php
|
||||
$upload_dir = $conf->recruitment->multidir_output[isset($object->entity) ? $object->entity : 1];
|
||||
|
||||
$usercanclose = $permissiontoadd;
|
||||
|
|
@ -473,8 +473,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
$relativepath = $objref.'/'.$objref.'.pdf';
|
||||
$filedir = $conf->recruitment->dir_output.'/'.$object->element.'/'.$objref;
|
||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
$genallowed = $user->rights->recruitment->recruitmentjobposition->read; // If you can read, you can build the PDF to read content
|
||||
$delallowed = $user->rights->recruitment->recruitmentjobposition->write; // If you can create/edit, you can remove a file on card
|
||||
$genallowed = $user->hasRight('recruitment', 'recruitmentjobposition', 'read'); // If you can read, you can build the PDF to read content
|
||||
$delallowed = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // If you can create/edit, you can remove a file on card
|
||||
print $formfile->showdocuments('recruitment:RecruitmentJobPosition', $object->element.'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||
$result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruitmentjobposition', 'recruitmentjobposition', '', 'rowid', $isdraft);
|
||||
|
||||
$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
$permissiontoadd = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
|
||||
|
||||
|
|
@ -182,8 +182,8 @@ if ($object->id) {
|
|||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'recruitment';
|
||||
$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write;
|
||||
$permtoedit = $user->rights->recruitment->recruitmentjobposition->write;
|
||||
$permissiontoadd = $user->hasRight('recruitment', 'recruitmentjobposition', 'write');
|
||||
$permtoedit = $user->hasRight('recruitment', 'recruitmentjobposition', 'write');
|
||||
$param = '&id='.$object->id;
|
||||
|
||||
$relativepathwithnofile = 'recruitmentjobposition/'.dol_sanitizeFileName($object->ref).'/';
|
||||
|
|
|
|||
|
|
@ -124,9 +124,9 @@ $object->fields = dol_sort_array($object->fields, 'position');
|
|||
$arrayfields['nbapplications'] = array('type'=>'integer', 'label'=>'Applications', 'checked'=>1, 'enabled'=>1, 'position'=>90, 'csslist'=>'right');
|
||||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
|
||||
$permissiontoread = $user->rights->recruitment->recruitmentjobposition->read;
|
||||
$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write;
|
||||
$permissiontodelete = $user->rights->recruitment->recruitmentjobposition->delete;
|
||||
$permissiontoread = $user->hasRight('recruitment', 'recruitmentjobposition', 'read');
|
||||
$permissiontoadd = $user->hasRight('recruitment', 'recruitmentjobposition', 'write');
|
||||
$permissiontodelete = $user->hasRight('recruitment', 'recruitmentjobposition', 'delete');
|
||||
|
||||
// Security check - Protection if external user
|
||||
//if ($user->socid > 0) accessforbidden();
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@ if ($id > 0 || !empty($ref)) {
|
|||
$upload_dir = $conf->recruitment->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id;
|
||||
}
|
||||
|
||||
$permissionnote = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
$permissionnote = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_setnotes.inc.php
|
||||
$permissiontoadd = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
// Security check - Protection if external user
|
||||
//if ($user->socid > 0) accessforbidden();
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ class Contacts extends DolibarrApi
|
|||
*/
|
||||
public function createUser($id, $request_data = null)
|
||||
{
|
||||
//if (!DolibarrApiAccess::$user->rights->user->user->creer) {
|
||||
//if (!DolibarrApiAccess::$user->hasRight('user', 'user', 'creer')) {
|
||||
//throw new RestException(401);
|
||||
//}
|
||||
|
||||
|
|
@ -394,7 +394,7 @@ class Contacts extends DolibarrApi
|
|||
if (!DolibarrApiAccess::$user->rights->societe->contact->lire) {
|
||||
throw new RestException(401, 'No permission to read contacts');
|
||||
}
|
||||
if (!DolibarrApiAccess::$user->rights->user->user->creer) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('user', 'user', 'creer')) {
|
||||
throw new RestException(401, 'No permission to create user');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ if (empty($account->userid)) {
|
|||
}
|
||||
|
||||
// Define value to know what current user can do on users
|
||||
$canadduser = (!empty($user->admin) || $user->rights->user->user->creer || $user->rights->hrm->write_personal_information->write);
|
||||
$canadduser = (!empty($user->admin) || $user->hasRight('user', 'user', 'creer') || $user->rights->hrm->write_personal_information->write);
|
||||
$canreaduser = (!empty($user->admin) || $user->rights->user->user->lire || $user->rights->hrm->read_personal_information->read);
|
||||
$permissiontoaddbankaccount = (!empty($user->rights->salaries->write) || !empty($user->rights->hrm->employee->write) || $user->hasRight('user', 'creer'));
|
||||
$permissiontoreadhr = $user->hasRight('hrm', 'read_personal_information', 'read') || $user->hasRight('hrm', 'write_personal_information', 'write');
|
||||
|
|
@ -266,7 +266,7 @@ llxHeader('', $title, $help_url);
|
|||
|
||||
$head = user_prepare_head($object);
|
||||
|
||||
if ($id && $bankid && $action == 'edit' && ($user->rights->user->user->creer || $user->rights->hrm->write_personal_information->write)) {
|
||||
if ($id && $bankid && $action == 'edit' && ($user->hasRight('user', 'user', 'creer') || $user->rights->hrm->write_personal_information->write)) {
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print "\n<script>";
|
||||
print 'jQuery(document).ready(function () {
|
||||
|
|
@ -469,9 +469,9 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
|
|||
if ($user->hasRight('hrm', 'read_personal_information', 'read') || $user->hasRight('hrm', 'write_personal_information', 'write')) {
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print $form->editfieldkey("DateOfBirth", 'birth', $object->birth, $object, $user->rights->user->user->creer);
|
||||
print $form->editfieldkey("DateOfBirth", 'birth', $object->birth, $object, $user->hasRight('user', 'user', 'creer'));
|
||||
print '</td><td>';
|
||||
print $form->editfieldval("DateOfBirth", 'birth', $object->birth, $object, $user->rights->user->user->creer, 'day', $object->birth);
|
||||
print $form->editfieldval("DateOfBirth", 'birth', $object->birth, $object, $user->hasRight('user', 'user', 'creer'), 'day', $object->birth);
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
|
@ -480,9 +480,9 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
|
|||
if ($user->hasRight('hrm', 'read_personal_information', 'read') || $user->hasRight('hrm', 'write_personal_information', 'write')) {
|
||||
print '<tr class="nowrap">';
|
||||
print '<td>';
|
||||
print $form->editfieldkey("UserPersonalEmail", 'personal_email', $object->personal_email, $object, $user->rights->user->user->creer || $user->rights->hrm->write_personal_information->write);
|
||||
print $form->editfieldkey("UserPersonalEmail", 'personal_email', $object->personal_email, $object, $user->hasRight('user', 'user', 'creer') || $user->rights->hrm->write_personal_information->write);
|
||||
print '</td><td>';
|
||||
print $form->editfieldval("UserPersonalEmail", 'personal_email', $object->personal_email, $object, $user->rights->user->user->creer || $user->rights->hrm->write_personal_information->write, 'email', '', null, null, '', 0, 'dol_print_email');
|
||||
print $form->editfieldval("UserPersonalEmail", 'personal_email', $object->personal_email, $object, $user->hasRight('user', 'user', 'creer') || $user->rights->hrm->write_personal_information->write, 'email', '', null, null, '', 0, 'dol_print_email');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
|
@ -491,9 +491,9 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
|
|||
if ($user->hasRight('hrm', 'read_personal_information', 'read') || $user->hasRight('hrm', 'write_personal_information', 'write')) {
|
||||
print '<tr class="nowrap">';
|
||||
print '<td>';
|
||||
print $form->editfieldkey("UserPersonalMobile", 'personal_mobile', $object->personal_mobile, $object, $user->rights->user->user->creer || $user->rights->hrm->write_personal_information->write);
|
||||
print $form->editfieldkey("UserPersonalMobile", 'personal_mobile', $object->personal_mobile, $object, $user->hasRight('user', 'user', 'creer') || $user->rights->hrm->write_personal_information->write);
|
||||
print '</td><td>';
|
||||
print $form->editfieldval("UserPersonalMobile", 'personal_mobile', $object->personal_mobile, $object, $user->rights->user->user->creer || $user->rights->hrm->write_personal_information->write, 'string', '', null, null, '', 0, 'dol_print_phone');
|
||||
print $form->editfieldval("UserPersonalMobile", 'personal_mobile', $object->personal_mobile, $object, $user->hasRight('user', 'user', 'creer') || $user->rights->hrm->write_personal_information->write, 'string', '', null, null, '', 0, 'dol_print_phone');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
|
@ -501,7 +501,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
|
|||
if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) {
|
||||
print '<tr class="nowrap">';
|
||||
print '<td>';
|
||||
print $form->editfieldkey("DefaultCategoryCar", 'default_c_exp_tax_cat', $object->default_c_exp_tax_cat, $object, $user->rights->user->user->creer);
|
||||
print $form->editfieldkey("DefaultCategoryCar", 'default_c_exp_tax_cat', $object->default_c_exp_tax_cat, $object, $user->hasRight('user', 'user', 'creer'));
|
||||
print '</td><td>';
|
||||
if ($action == 'editdefault_c_exp_tax_cat') {
|
||||
$ret = '<form method="post" action="'.$_SERVER["PHP_SELF"].($moreparam ? '?'.$moreparam : '').'">';
|
||||
|
|
@ -516,14 +516,14 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
|
|||
} else {
|
||||
$label_exp_tax_cat = dol_getIdFromCode($db, $object->default_c_exp_tax_cat, 'c_exp_tax_cat', 'rowid', 'label');
|
||||
print $langs->trans($label_exp_tax_cat);
|
||||
//print $form->editfieldval("DefaultCategoryCar", 'default_c_exp_tax_cat', $object->default_c_exp_tax_cat, $object, $user->rights->user->user->creer, 'string', ($object->default_c_exp_tax_cat != '' ? $object->default_c_exp_tax_cat : ''));
|
||||
//print $form->editfieldval("DefaultCategoryCar", 'default_c_exp_tax_cat', $object->default_c_exp_tax_cat, $object, $user->hasRight('user', 'user', 'creer'), 'string', ($object->default_c_exp_tax_cat != '' ? $object->default_c_exp_tax_cat : ''));
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="nowrap">';
|
||||
print '<td>';
|
||||
print $form->editfieldkey("DefaultRangeNumber", 'default_range', $object->default_range, $object, $user->rights->user->user->creer);
|
||||
print $form->editfieldkey("DefaultRangeNumber", 'default_range', $object->default_range, $object, $user->hasRight('user', 'user', 'creer'));
|
||||
print '</td><td>';
|
||||
if ($action == 'editdefault_range') {
|
||||
$ret = '<form method="post" action="'.$_SERVER["PHP_SELF"].($moreparam ? '?'.$moreparam : '').'">';
|
||||
|
|
|
|||
|
|
@ -1092,7 +1092,7 @@ if ($action == 'create' || $action == 'adduserldap') {
|
|||
print $valuetoshow;
|
||||
print '</td></tr>';
|
||||
|
||||
if (!empty($conf->api->enabled)) {
|
||||
if (isModEnabled('api')) {
|
||||
// API key
|
||||
//$generated_password = getRandomPassword(false);
|
||||
print '<tr><td>'.$langs->trans("ApiKey").'</td>';
|
||||
|
|
@ -1890,7 +1890,7 @@ if ($action == 'create' || $action == 'adduserldap') {
|
|||
}
|
||||
|
||||
// API key
|
||||
if (!empty($conf->api->enabled) && ($user->id == $id || $user->admin || $user->hasRight("api", "apikey", "generate"))) {
|
||||
if (isModEnabled('api') && ($user->id == $id || $user->admin || $user->hasRight("api", "apikey", "generate"))) {
|
||||
print '<tr class="nooddeven"><td>'.$langs->trans("ApiKey").'</td>';
|
||||
print '<td>';
|
||||
if (!empty($object->api_key)) {
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ class Users extends DolibarrApi
|
|||
public function put($id, $request_data = null)
|
||||
{
|
||||
// Check user authorization
|
||||
if (empty(DolibarrApiAccess::$user->rights->user->user->creer) && empty(DolibarrApiAccess::$user->admin)) {
|
||||
if (empty(DolibarrApiAccess::$user->hasRight('user', 'user', 'creer')) && empty(DolibarrApiAccess::$user->admin)) {
|
||||
throw new RestException(401, "User update not allowed");
|
||||
}
|
||||
|
||||
|
|
@ -473,7 +473,7 @@ class Users extends DolibarrApi
|
|||
{
|
||||
global $conf;
|
||||
|
||||
if (empty(DolibarrApiAccess::$user->rights->user->user->creer) && empty(DolibarrApiAccess::$user->admin)) {
|
||||
if (empty(DolibarrApiAccess::$user->hasRight('user', 'user', 'creer')) && empty(DolibarrApiAccess::$user->admin)) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ $fieldstosearchall = array(
|
|||
'u.note_public'=>"NotePublic",
|
||||
'u.note_private'=>"NotePrivate"
|
||||
);
|
||||
if (!empty($conf->api->enabled)) {
|
||||
if (isModEnabled('api')) {
|
||||
$fieldstosearchall['u.api_key'] = "ApiKey";
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ $arrayfields = array(
|
|||
'u.office_phone'=>array('label'=>"PhonePro", 'checked'=>1, 'position'=>31),
|
||||
'u.user_mobile'=>array('label'=>"PhoneMobile", 'checked'=>1, 'position'=>32),
|
||||
'u.email'=>array('label'=>"EMail", 'checked'=>1, 'position'=>35),
|
||||
'u.api_key'=>array('label'=>"ApiKey", 'checked'=>0, 'position'=>40, "enabled"=>(!empty($conf->api->enabled) && $user->admin)),
|
||||
'u.api_key'=>array('label'=>"ApiKey", 'checked'=>0, 'position'=>40, "enabled"=>(isModEnabled('api') && $user->admin)),
|
||||
'u.fk_soc'=>array('label'=>"Company", 'checked'=>($contextpage == 'employeelist' ? 0 : 1), 'position'=>45),
|
||||
'u.ref_employee'=>array('label'=>"RefEmployee", 'checked'=>-1, 'position'=>60, 'enabled'=>(isModEnabled('hrm') && $permissiontoreadhr)),
|
||||
'u.national_registration_number'=>array('label'=>"NationalRegistrationNumber", 'checked'=>-1, 'position'=>61, 'enabled'=>(isModEnabled('hrm') && $permissiontoreadhr)),
|
||||
|
|
|
|||
Loading…
Reference in a new issue