commit
b281924f03
@ -112,7 +112,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
|
|||||||
$this->tpl['actionsdone'] = show_actions_done($conf, $langs, $db, $objsoc, $this->object, 1);
|
$this->tpl['actionsdone'] = show_actions_done($conf, $langs, $db, $objsoc, $this->object, 1);
|
||||||
} else {
|
} else {
|
||||||
// Confirm delete contact
|
// Confirm delete contact
|
||||||
if ($action == 'delete' && $user->rights->adherent->supprimer) {
|
if ($action == 'delete' && $user->hasRight('adherent', 'supprimer')) {
|
||||||
$this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id, $langs->trans("DeleteAdherent"), $langs->trans("ConfirmDeleteAdherent"), "confirm_delete", '', 0, 1);
|
$this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id, $langs->trans("DeleteAdherent"), $langs->trans("ConfirmDeleteAdherent"), "confirm_delete", '', 0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -128,12 +128,12 @@ if (empty($user->socid)) {
|
|||||||
echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans('Modify').'</a>';
|
echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans('Modify').'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->control->tpl['user_id'] && $user->rights->user->user->creer) {
|
if (!$this->control->tpl['user_id'] && $user->hasRight('user', 'user', 'creer')) {
|
||||||
echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=create_user&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=create_user&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->adherent->supprimer) {
|
if ($user->hasRight('adherent', 'supprimer')) {
|
||||||
print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=delete&token='.newToken().'&canvas='.$canvas, 'delete', $user->rights->adherent->supprimer);
|
print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=delete&token='.newToken().'&canvas='.$canvas, 'delete', $user->hasRight('adherent', 'supprimer'));
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</div><br>';
|
echo '</div><br>';
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2012-2020 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2012-2020 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2015-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2015-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2021 Waël Almoman <info@almoman.com>
|
* Copyright (C) 2021 Waël Almoman <info@almoman.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -305,23 +305,23 @@ if (empty($reshook)) {
|
|||||||
$object->phone = trim(GETPOST("phone", 'alpha'));
|
$object->phone = trim(GETPOST("phone", 'alpha'));
|
||||||
$object->phone_perso = trim(GETPOST("phone_perso", 'alpha'));
|
$object->phone_perso = trim(GETPOST("phone_perso", 'alpha'));
|
||||||
$object->phone_mobile = trim(GETPOST("phone_mobile", 'alpha'));
|
$object->phone_mobile = trim(GETPOST("phone_mobile", 'alpha'));
|
||||||
$object->email = preg_replace('/\s+/', '', GETPOST("member_email", 'alpha'));
|
$object->email = preg_replace('/\s+/', '', GETPOST("member_email", 'alpha'));
|
||||||
$object->url = trim(GETPOST('member_url', 'custom', 0, FILTER_SANITIZE_URL));
|
$object->url = trim(GETPOST('member_url', 'custom', 0, FILTER_SANITIZE_URL));
|
||||||
$object->socialnetworks = array();
|
$object->socialnetworks = array();
|
||||||
foreach ($socialnetworks as $key => $value) {
|
foreach ($socialnetworks as $key => $value) {
|
||||||
if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') {
|
if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') {
|
||||||
$object->socialnetworks[$key] = trim(GETPOST($key, 'alphanohtml'));
|
$object->socialnetworks[$key] = trim(GETPOST($key, 'alphanohtml'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//$object->skype = trim(GETPOST("skype", 'alpha'));
|
//$object->skype = trim(GETPOST("skype", 'alpha'));
|
||||||
//$object->twitter = trim(GETPOST("twitter", 'alpha'));
|
//$object->twitter = trim(GETPOST("twitter", 'alpha'));
|
||||||
//$object->facebook = trim(GETPOST("facebook", 'alpha'));
|
//$object->facebook = trim(GETPOST("facebook", 'alpha'));
|
||||||
//$object->linkedin = trim(GETPOST("linkedin", 'alpha'));
|
//$object->linkedin = trim(GETPOST("linkedin", 'alpha'));
|
||||||
$object->birth = $birthdate;
|
$object->birth = $birthdate;
|
||||||
$object->default_lang = GETPOST('default_lang', 'alpha');
|
$object->default_lang = GETPOST('default_lang', 'alpha');
|
||||||
$object->typeid = GETPOST("typeid", 'int');
|
$object->typeid = GETPOST("typeid", 'int');
|
||||||
//$object->note = trim(GETPOST("comment","alpha"));
|
//$object->note = trim(GETPOST("comment","alpha"));
|
||||||
$object->morphy = GETPOST("morphy", 'alpha');
|
$object->morphy = GETPOST("morphy", 'alpha');
|
||||||
|
|
||||||
if (GETPOST('deletephoto', 'alpha')) {
|
if (GETPOST('deletephoto', 'alpha')) {
|
||||||
$object->photo = '';
|
$object->photo = '';
|
||||||
@ -330,8 +330,8 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get status and public property
|
// Get status and public property
|
||||||
$object->statut = GETPOST("statut", 'alpha');
|
$object->statut = GETPOST("statut", 'alpha');
|
||||||
$object->public = GETPOST("public", 'alpha');
|
$object->public = GETPOST("public", 'alpha');
|
||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||||
@ -342,7 +342,7 @@ if (empty($reshook)) {
|
|||||||
// Check if we need to also synchronize user information
|
// Check if we need to also synchronize user information
|
||||||
$nosyncuser = 0;
|
$nosyncuser = 0;
|
||||||
if ($object->user_id) { // If linked to a user
|
if ($object->user_id) { // If linked to a user
|
||||||
if ($user->id != $object->user_id && empty($user->rights->user->user->creer)) {
|
if ($user->id != $object->user_id && !$user->hasRight('user', 'user', 'creer')) {
|
||||||
$nosyncuser = 1; // Disable synchronizing
|
$nosyncuser = 1; // Disable synchronizing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -350,7 +350,7 @@ if (empty($reshook)) {
|
|||||||
// Check if we need to also synchronize password information
|
// Check if we need to also synchronize password information
|
||||||
$nosyncuserpass = 0;
|
$nosyncuserpass = 0;
|
||||||
if ($object->user_id) { // If linked to a user
|
if ($object->user_id) { // If linked to a user
|
||||||
if ($user->id != $object->user_id && empty($user->rights->user->user->password)) {
|
if ($user->id != $object->user_id && !$user->hasRight('user', 'user', 'password')) {
|
||||||
$nosyncuserpass = 1; // Disable synchronizing
|
$nosyncuserpass = 1; // Disable synchronizing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -454,7 +454,7 @@ if (empty($reshook)) {
|
|||||||
// $facebook=GETPOST("member_facebook", 'alpha');
|
// $facebook=GETPOST("member_facebook", 'alpha');
|
||||||
// $linkedin=GETPOST("member_linkedin", 'alpha');
|
// $linkedin=GETPOST("member_linkedin", 'alpha');
|
||||||
$email = preg_replace('/\s+/', '', GETPOST("member_email", 'alpha'));
|
$email = preg_replace('/\s+/', '', GETPOST("member_email", 'alpha'));
|
||||||
$url = trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL));
|
$url = trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL));
|
||||||
$login = GETPOST("member_login", 'alphanohtml');
|
$login = GETPOST("member_login", 'alphanohtml');
|
||||||
$pass = GETPOST("password", 'none'); // For password, we use 'none'
|
$pass = GETPOST("password", 'none'); // For password, we use 'none'
|
||||||
$photo = GETPOST("photo", 'alphanohtml');
|
$photo = GETPOST("photo", 'alphanohtml');
|
||||||
@ -659,7 +659,7 @@ if (empty($reshook)) {
|
|||||||
$outputlangs->loadLangs(array("main", "members", "companies", "install", "other"));
|
$outputlangs->loadLangs(array("main", "members", "companies", "install", "other"));
|
||||||
// Get email content from template
|
// Get email content from template
|
||||||
$arraydefaultmessage = null;
|
$arraydefaultmessage = null;
|
||||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION;
|
$labeltouse = getDolGlobalString('ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION');
|
||||||
|
|
||||||
if (!empty($labeltouse)) {
|
if (!empty($labeltouse)) {
|
||||||
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse);
|
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse);
|
||||||
@ -731,7 +731,7 @@ if (empty($reshook)) {
|
|||||||
$outputlangs->loadLangs(array("main", "members", "companies", "install", "other"));
|
$outputlangs->loadLangs(array("main", "members", "companies", "install", "other"));
|
||||||
// Get email content from template
|
// Get email content from template
|
||||||
$arraydefaultmessage = null;
|
$arraydefaultmessage = null;
|
||||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_CANCELATION;
|
$labeltouse = getDolGlobalString('ADHERENT_EMAIL_TEMPLATE_CANCELATION');
|
||||||
|
|
||||||
if (!empty($labeltouse)) {
|
if (!empty($labeltouse)) {
|
||||||
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse);
|
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse);
|
||||||
@ -802,7 +802,7 @@ if (empty($reshook)) {
|
|||||||
$outputlangs->loadLangs(array("main", "members", "companies", "install", "other"));
|
$outputlangs->loadLangs(array("main", "members", "companies", "install", "other"));
|
||||||
// Get email content from template
|
// Get email content from template
|
||||||
$arraydefaultmessage = null;
|
$arraydefaultmessage = null;
|
||||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_EXCLUSION;
|
$labeltouse = getDolGlobalString('ADHERENT_EMAIL_TEMPLATE_EXCLUSION');
|
||||||
|
|
||||||
if (!empty($labeltouse)) {
|
if (!empty($labeltouse)) {
|
||||||
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse);
|
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse);
|
||||||
@ -1524,7 +1524,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
|
|
||||||
if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
|
if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
|
||||||
$subject = $arraydefaultmessage->topic;
|
$subject = $arraydefaultmessage->topic;
|
||||||
$msg = $arraydefaultmessage->content;
|
$msg = $arraydefaultmessage->content;
|
||||||
}
|
}
|
||||||
|
|
||||||
$substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object);
|
$substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object);
|
||||||
@ -1533,10 +1533,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
$texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnValid()), $substitutionarray, $outputlangs);
|
$texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnValid()), $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tmp = $langs->trans("SendingAnEMailToMember");
|
$tmp = $langs->trans("SendingAnEMailToMember");
|
||||||
$tmp .= '<br>'.$langs->trans("MailFrom").': <b>'.$conf->global->ADHERENT_MAIL_FROM.'</b>, ';
|
$tmp .= '<br>'.$langs->trans("MailFrom").': <b>'.getDolGlobalString('ADHERENT_MAIL_FROM').'</b>, ';
|
||||||
$tmp .= '<br>'.$langs->trans("MailRecipient").': <b>'.$object->email.'</b>';
|
$tmp .= '<br>'.$langs->trans("MailRecipient").': <b>'.$object->email.'</b>';
|
||||||
$helpcontent = '';
|
$helpcontent = '';
|
||||||
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.$conf->global->ADHERENT_MAIL_FROM.'<br>'."\n";
|
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.getDolGlobalString('ADHERENT_MAIL_FROM').'<br>'."\n";
|
||||||
$helpcontent .= '<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n";
|
$helpcontent .= '<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n";
|
||||||
$helpcontent .= '<b>'.$langs->trans("Subject").'</b>:<br>'."\n";
|
$helpcontent .= '<b>'.$langs->trans("Subject").'</b>:<br>'."\n";
|
||||||
$helpcontent .= $subjecttosend."\n";
|
$helpcontent .= $subjecttosend."\n";
|
||||||
@ -1596,10 +1596,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
$texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnResiliate()), $substitutionarray, $outputlangs);
|
$texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnResiliate()), $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tmp = $langs->trans("SendingAnEMailToMember");
|
$tmp = $langs->trans("SendingAnEMailToMember");
|
||||||
$tmp .= '<br>('.$langs->trans("MailFrom").': <b>'.$conf->global->ADHERENT_MAIL_FROM.'</b>, ';
|
$tmp .= '<br>('.$langs->trans("MailFrom").': <b>'.getDolGlobalString('ADHERENT_MAIL_FROM').'</b>, ';
|
||||||
$tmp .= $langs->trans("MailRecipient").': <b>'.$object->email.'</b>)';
|
$tmp .= $langs->trans("MailRecipient").': <b>'.$object->email.'</b>)';
|
||||||
$helpcontent = '';
|
$helpcontent = '';
|
||||||
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.$conf->global->ADHERENT_MAIL_FROM.'<br>'."\n";
|
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.getDolGlobalString('ADHERENT_MAIL_FROM').'<br>'."\n";
|
||||||
$helpcontent .= '<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n";
|
$helpcontent .= '<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n";
|
||||||
$helpcontent .= '<b>'.$langs->trans("Subject").'</b>:<br>'."\n";
|
$helpcontent .= '<b>'.$langs->trans("Subject").'</b>:<br>'."\n";
|
||||||
$helpcontent .= $subjecttosend."\n";
|
$helpcontent .= $subjecttosend."\n";
|
||||||
@ -1639,7 +1639,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
$outputlangs->loadLangs(array("main", "members"));
|
$outputlangs->loadLangs(array("main", "members"));
|
||||||
// Get email content from template
|
// Get email content from template
|
||||||
$arraydefaultmessage = null;
|
$arraydefaultmessage = null;
|
||||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_EXCLUSION;
|
$labeltouse = getDolGlobalString('ADHERENT_EMAIL_TEMPLATE_EXCLUSION');
|
||||||
|
|
||||||
if (!empty($labeltouse)) {
|
if (!empty($labeltouse)) {
|
||||||
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse);
|
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse);
|
||||||
@ -1656,10 +1656,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
$texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnExclude()), $substitutionarray, $outputlangs);
|
$texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnExclude()), $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tmp = $langs->trans("SendingAnEMailToMember");
|
$tmp = $langs->trans("SendingAnEMailToMember");
|
||||||
$tmp .= '<br>('.$langs->trans("MailFrom").': <b>'.$conf->global->ADHERENT_MAIL_FROM.'</b>, ';
|
$tmp .= '<br>('.$langs->trans("MailFrom").': <b>'.getDolGlobalString('ADHERENT_MAIL_FROM').'</b>, ';
|
||||||
$tmp .= $langs->trans("MailRecipient").': <b>'.$object->email.'</b>)';
|
$tmp .= $langs->trans("MailRecipient").': <b>'.$object->email.'</b>)';
|
||||||
$helpcontent = '';
|
$helpcontent = '';
|
||||||
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.$conf->global->ADHERENT_MAIL_FROM.'<br>'."\n";
|
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.getDolGlobalString('ADHERENT_MAIL_FROM').'<br>'."\n";
|
||||||
$helpcontent .= '<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n";
|
$helpcontent .= '<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n";
|
||||||
$helpcontent .= '<b>'.$langs->trans("Subject").'</b>:<br>'."\n";
|
$helpcontent .= '<b>'.$langs->trans("Subject").'</b>:<br>'."\n";
|
||||||
$helpcontent .= $subjecttosend."\n";
|
$helpcontent .= $subjecttosend."\n";
|
||||||
|
|||||||
@ -445,8 +445,8 @@ class Adherent extends CommonObject
|
|||||||
|
|
||||||
// Envoi mail confirmation
|
// Envoi mail confirmation
|
||||||
$from = $conf->email_from;
|
$from = $conf->email_from;
|
||||||
if (!empty($conf->global->ADHERENT_MAIL_FROM)) {
|
if (!empty(getDolGlobalString('ADHERENT_MAIL_FROM'))) {
|
||||||
$from = $conf->global->ADHERENT_MAIL_FROM;
|
$from = getDolGlobalString('ADHERENT_MAIL_FROM');
|
||||||
}
|
}
|
||||||
|
|
||||||
$trackid = 'mem'.$this->id;
|
$trackid = 'mem'.$this->id;
|
||||||
@ -3051,7 +3051,7 @@ class Adherent extends CommonObject
|
|||||||
|
|
||||||
$subject = make_substitutions($arraydefaultmessage->topic, $substitutionarray, $outputlangs);
|
$subject = make_substitutions($arraydefaultmessage->topic, $substitutionarray, $outputlangs);
|
||||||
$msg = make_substitutions($arraydefaultmessage->content, $substitutionarray, $outputlangs);
|
$msg = make_substitutions($arraydefaultmessage->content, $substitutionarray, $outputlangs);
|
||||||
$from = $conf->global->ADHERENT_MAIL_FROM;
|
$from = getDolGlobalString('ADHERENT_MAIL_FROM');
|
||||||
$to = $adherent->email;
|
$to = $adherent->email;
|
||||||
|
|
||||||
$trackid = 'mem'.$adherent->id;
|
$trackid = 'mem'.$adherent->id;
|
||||||
|
|||||||
@ -62,7 +62,7 @@ class Members extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function get($id)
|
public function get($id)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->lire) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'lire')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ class Members extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function getByThirdparty($thirdparty)
|
public function getByThirdparty($thirdparty)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->lire) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'lire')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ class Members extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function getByThirdpartyEmail($email)
|
public function getByThirdpartyEmail($email)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->lire) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'lire')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ class Members extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function getByThirdpartyBarcode($barcode)
|
public function getByThirdpartyBarcode($barcode)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->lire) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'lire')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,7 +217,7 @@ class Members extends DolibarrApi
|
|||||||
|
|
||||||
$obj_ret = array();
|
$obj_ret = array();
|
||||||
|
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->lire) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'lire')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -370,7 +370,7 @@ class Members extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->supprimer) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'supprimer')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
$member = new Adherent($this->db);
|
$member = new Adherent($this->db);
|
||||||
@ -464,7 +464,7 @@ class Members extends DolibarrApi
|
|||||||
{
|
{
|
||||||
$obj_ret = array();
|
$obj_ret = array();
|
||||||
|
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->cotisation->lire) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'cotisation', 'lire')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -495,7 +495,7 @@ class Members extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function createSubscription($id, $start_date, $end_date, $amount, $label = '')
|
public function createSubscription($id, $start_date, $end_date, $amount, $label = '')
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->cotisation->creer) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'cotisation', 'creer')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,7 @@ class MembersTypes extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function get($id)
|
public function get($id)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->lire) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'lire')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ class MembersTypes extends DolibarrApi
|
|||||||
|
|
||||||
$obj_ret = array();
|
$obj_ret = array();
|
||||||
|
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->lire) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'lire')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ class MembersTypes extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function post($request_data = null)
|
public function post($request_data = null)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->configurer) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'configurer')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
// Check mandatory fields
|
// Check mandatory fields
|
||||||
@ -176,7 +176,7 @@ class MembersTypes extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function put($id, $request_data = null)
|
public function put($id, $request_data = null)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->configurer) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'configurer')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ class MembersTypes extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->configurer) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'configurer')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
$membertype = new AdherentType($this->db);
|
$membertype = new AdherentType($this->db);
|
||||||
|
|||||||
@ -58,7 +58,7 @@ class Subscriptions extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function get($id)
|
public function get($id)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->cotisation->lire) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'cotisation', 'lire')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ class Subscriptions extends DolibarrApi
|
|||||||
|
|
||||||
$obj_ret = array();
|
$obj_ret = array();
|
||||||
|
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->cotisation->lire) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'cotisation', 'lire')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ class Subscriptions extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function post($request_data = null)
|
public function post($request_data = null)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->cotisation->creer) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'cotisation', 'creer')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
// Check mandatory fields
|
// Check mandatory fields
|
||||||
@ -206,7 +206,7 @@ class Subscriptions extends DolibarrApi
|
|||||||
public function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
// The right to delete a subscription comes with the right to create one.
|
// The right to delete a subscription comes with the right to create one.
|
||||||
if (!DolibarrApiAccess::$user->rights->adherent->cotisation->creer) {
|
if (!DolibarrApiAccess::$user->hasRight('adherent', 'cotisation', 'creer')) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
$subscription = new Subscription($this->db);
|
$subscription = new Subscription($this->db);
|
||||||
|
|||||||
@ -37,7 +37,7 @@ $sortorder = GETPOST('sortorder', 'aZ09');
|
|||||||
if (!isModEnabled('adherent')) {
|
if (!isModEnabled('adherent')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (empty($user->rights->adherent->export)) {
|
if (!$user->hasRight('adherent', 'export')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -51,14 +51,14 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
$result = $object->fetch($id, $ref);
|
$result = $object->fetch($id, $ref);
|
||||||
|
|
||||||
// Define variables to know what current user can do on users
|
// Define variables to know what current user can do on users
|
||||||
$canadduser = (!empty($user->admin) || !empty($user->rights->user->user->creer));
|
$canadduser = (!empty($user->admin) || $user->hasRight('user', 'user', 'creer'));
|
||||||
// Define variables to know what current user can do on properties of user linked to edited member
|
// Define variables to know what current user can do on properties of user linked to edited member
|
||||||
if ($object->user_id) {
|
if ($object->user_id) {
|
||||||
// $User is the user who edits, $object->user_id is the id of the related user in the edited member
|
// $User is the user who edits, $object->user_id is the id of the related user in the edited member
|
||||||
$caneditfielduser = ((($user->id == $object->user_id) && !empty($user->rights->user->self->creer))
|
$caneditfielduser = ((($user->id == $object->user_id) && !empty($user->rights->user->self->creer))
|
||||||
|| (($user->id != $object->user_id) && !empty($user->rights->user->user->creer)));
|
|| (($user->id != $object->user_id) && $user->hasRight('user', 'user', 'creer')));
|
||||||
$caneditpassworduser = ((($user->id == $object->user_id) && $user->rights->user->self->password)
|
$caneditpassworduser = ((($user->id == $object->user_id) && $user->rights->user->self->password)
|
||||||
|| (($user->id != $object->user_id) && !empty($user->rights->user->user->password)));
|
|| (($user->id != $object->user_id) && $user->hasRight('user', 'user', 'password')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -262,7 +262,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create external user
|
// Create external user
|
||||||
if ($massaction == 'createexternaluser' && $user->hasRight('adherent', 'creer') && $user->rights->user->user->creer) {
|
if ($massaction == 'createexternaluser' && $user->hasRight('adherent', 'creer') && $user->hasRight('user', 'user', 'creer')) {
|
||||||
$tmpmember = new Adherent($db);
|
$tmpmember = new Adherent($db);
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$nbcreated = 0;
|
$nbcreated = 0;
|
||||||
|
|||||||
@ -76,13 +76,13 @@ foreach ($object->fields as $key => $val) {
|
|||||||
// Load object
|
// Load object
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||||
|
|
||||||
$permissiontoread = $user->rights->partnership->read;
|
$permissiontoread = $user->hasRight('partnership', 'read');
|
||||||
$permissiontoadd = $user->rights->partnership->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
$permissiontoadd = $user->hasRight('partnership', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||||
$permissiontodelete = $user->rights->partnership->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
$permissiontodelete = $user->hasRight('partnership', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||||
$permissionnote = $user->rights->partnership->write; // Used by the include of actions_setnotes.inc.php
|
$permissionnote = $user->hasRight('partnership', 'write'); // Used by the include of actions_setnotes.inc.php
|
||||||
$permissiondellink = $user->rights->partnership->write; // Used by the include of actions_dellink.inc.php
|
$permissiondellink = $user->hasRight('partnership', 'write'); // Used by the include of actions_dellink.inc.php
|
||||||
$usercanclose = $user->rights->partnership->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
$usercanclose = $user->hasRight('partnership', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||||
$upload_dir = $conf->partnership->multidir_output[isset($object->entity) ? $object->entity : 1];
|
$upload_dir = $conf->partnership->multidir_output[isset($object->entity) ? $object->entity : 1];
|
||||||
|
|
||||||
|
|
||||||
if (getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') != 'member') {
|
if (getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') != 'member') {
|
||||||
|
|||||||
@ -151,9 +151,9 @@ if (empty($reshook) && $action == 'confirm_create_thirdparty' && $confirm == 'ye
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($reshook) && $action == 'setuserid' && ($user->rights->user->self->creer || $user->rights->user->user->creer)) {
|
if (empty($reshook) && $action == 'setuserid' && ($user->rights->user->self->creer || $user->hasRight('user', 'user', 'creer'))) {
|
||||||
$error = 0;
|
$error = 0;
|
||||||
if (empty($user->rights->user->user->creer)) { // If can edit only itself user, we can link to itself only
|
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) {
|
if (GETPOST("userid", 'int') != $user->id && GETPOST("userid", 'int') != $object->user_id) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly"), null, 'errors');
|
setEventMessages($langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly"), null, 'errors');
|
||||||
@ -201,7 +201,7 @@ if (empty($reshook) && $action == 'setsocid') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !$cancel) {
|
if ($user->hasRight('adherent', 'cotisation', 'creer') && $action == 'subscription' && !$cancel) {
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
@ -674,7 +674,7 @@ if ($rowid > 0) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Button to create a new subscription if member no draft (-1) neither resiliated (0) neither excluded (-2)
|
// Button to create a new subscription if member no draft (-1) neither resiliated (0) neither excluded (-2)
|
||||||
if ($user->rights->adherent->cotisation->creer) {
|
if ($user->hasRight('adherent', 'cotisation', 'creer')) {
|
||||||
if ($action != 'addsubscription' && $action != 'create_thirdparty') {
|
if ($action != 'addsubscription' && $action != 'create_thirdparty') {
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
@ -814,7 +814,7 @@ if ($rowid > 0) {
|
|||||||
/*
|
/*
|
||||||
* Add new subscription form
|
* Add new subscription form
|
||||||
*/
|
*/
|
||||||
if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->rights->adherent->cotisation->creer) {
|
if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->hasRight('adherent', 'cotisation', 'creer')) {
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("NewCotisation"));
|
print load_fiche_titre($langs->trans("NewCotisation"));
|
||||||
@ -1142,7 +1142,7 @@ if ($rowid > 0) {
|
|||||||
|
|
||||||
$tmp = '<input name="sendmail" type="checkbox"'.(GETPOST('sendmail', 'alpha') ? ' checked' : (!empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL) ? ' checked' : '')).'>';
|
$tmp = '<input name="sendmail" type="checkbox"'.(GETPOST('sendmail', 'alpha') ? ' checked' : (!empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL) ? ' checked' : '')).'>';
|
||||||
$helpcontent = '';
|
$helpcontent = '';
|
||||||
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.$conf->global->ADHERENT_MAIL_FROM.'<br>'."\n";
|
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.getDolGlobalString('ADHERENT_MAIL_FROM').'<br>'."\n";
|
||||||
$helpcontent .= '<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n";
|
$helpcontent .= '<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n";
|
||||||
$helpcontent .= '<b>'.$langs->trans("MailTopic").'</b>:<br>'."\n";
|
$helpcontent .= '<b>'.$langs->trans("MailTopic").'</b>:<br>'."\n";
|
||||||
if ($subjecttosend) {
|
if ($subjecttosend) {
|
||||||
|
|||||||
@ -49,13 +49,13 @@ $note = GETPOST('note', 'alpha');
|
|||||||
$typeid = (int) GETPOST('typeid', 'int');
|
$typeid = (int) GETPOST('typeid', 'int');
|
||||||
$amount = price2num(GETPOST('amount', 'alpha'), 'MT');
|
$amount = price2num(GETPOST('amount', 'alpha'), 'MT');
|
||||||
|
|
||||||
if (empty($user->rights->adherent->cotisation->lire)) {
|
if (!$user->hasRight('adherent', 'cotisation', 'lire')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
$permissionnote = $user->rights->adherent->cotisation->creer; // Used by the include of actions_setnotes.inc.php
|
$permissionnote = $user->hasRight('adherent', 'cotisation', 'creer'); // Used by the include of actions_setnotes.inc.php
|
||||||
$permissiondellink = $user->rights->adherent->cotisation->creer; // Used by the include of actions_dellink.inc.php
|
$permissiondellink = $user->hasRight('adherent', 'cotisation', 'creer'); // Used by the include of actions_dellink.inc.php
|
||||||
$permissiontoedit = $user->rights->adherent->cotisation->creer; // Used by the include of actions_lineupdonw.inc.php
|
$permissiontoedit = $user->hasRight('adherent', 'cotisation', 'creer'); // Used by the include of actions_lineupdonw.inc.php
|
||||||
|
|
||||||
$hookmanager->initHooks(array('subscriptioncard', 'globalcard'));
|
$hookmanager->initHooks(array('subscriptioncard', 'globalcard'));
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, n
|
|||||||
//include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
|
//include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
|
|
||||||
if ($user->rights->adherent->cotisation->creer && $action == 'update' && !$cancel) {
|
if ($user->hasRight('adherent', 'cotisation', 'creer') && $action == 'update' && !$cancel) {
|
||||||
// Load current object
|
// Load current object
|
||||||
$result = $object->fetch($rowid);
|
$result = $object->fetch($rowid);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
@ -140,7 +140,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'update' && !$cance
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->adherent->cotisation->creer) {
|
if ($action == 'confirm_delete' && $confirm == 'yes' && $user->hasRight('adherent', 'cotisation', 'creer')) {
|
||||||
$result = $object->fetch($rowid);
|
$result = $object->fetch($rowid);
|
||||||
$result = $object->delete($user);
|
$result = $object->delete($user);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
@ -166,7 +166,7 @@ llxHeader('', $langs->trans("SubscriptionCard"), $help_url);
|
|||||||
dol_htmloutput_errors($errmsg);
|
dol_htmloutput_errors($errmsg);
|
||||||
|
|
||||||
|
|
||||||
if ($user->rights->adherent->cotisation->creer && $action == 'edit') {
|
if ($user->hasRight('adherent', 'cotisation', 'creer') && $action == 'edit') {
|
||||||
/********************************************
|
/********************************************
|
||||||
*
|
*
|
||||||
* Subscription card in edit mode
|
* Subscription card in edit mode
|
||||||
@ -350,7 +350,7 @@ if ($rowid && $action != 'edit') {
|
|||||||
*/
|
*/
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($user->rights->adherent->cotisation->creer) {
|
if ($user->hasRight('adherent', 'cotisation', 'creer')) {
|
||||||
if (!empty($bankline->rappro)) {
|
if (!empty($bankline->rappro)) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"]."?rowid=".$object->id.'&action=edit&token='.newToken().'">'.$langs->trans("Modify")."</a></div>";
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"]."?rowid=".$object->id.'&action=edit&token='.newToken().'">'.$langs->trans("Modify")."</a></div>";
|
||||||
} else {
|
} else {
|
||||||
@ -359,7 +359,7 @@ if ($rowid && $action != 'edit') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete
|
// Delete
|
||||||
if ($user->rights->adherent->cotisation->creer) {
|
if ($user->hasRight('adherent', 'cotisation', 'creer')) {
|
||||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"]."?rowid=".$object->id.'&action=delete&token='.newToken().'">'.$langs->trans("Delete")."</a></div>\n";
|
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"]."?rowid=".$object->id.'&action=delete&token='.newToken().'">'.$langs->trans("Delete")."</a></div>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("companies", "members", "bills", "users"));
|
$langs->loadLangs(array("companies", "members", "bills", "users"));
|
||||||
|
|
||||||
if (empty($user->rights->adherent->lire)) {
|
if (!$user->hasRight('adherent', 'lire')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -291,14 +291,14 @@ $arrayofmassactions = array(
|
|||||||
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
|
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
|
||||||
//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
|
//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
|
||||||
);
|
);
|
||||||
//if ($user->rights->adherent->supprimer) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
//if ($user->hasRight('adherent', 'supprimer')) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||||
if (in_array($massaction, array('presend', 'predelete'))) {
|
if (in_array($massaction, array('presend', 'predelete'))) {
|
||||||
$arrayofmassactions = array();
|
$arrayofmassactions = array();
|
||||||
}
|
}
|
||||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||||
|
|
||||||
$newcardbutton = '';
|
$newcardbutton = '';
|
||||||
if ($user->rights->adherent->cotisation->creer) {
|
if ($user->hasRight('adherent', 'cotisation', 'creer')) {
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewSubscription'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/list.php?status=-1,1');
|
$newcardbutton .= dolGetButtonTitle($langs->trans('NewSubscription'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/list.php?status=-1,1');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
|
|||||||
echo '<td class="center"></td>';
|
echo '<td class="center"></td>';
|
||||||
echo '<td class="center">'.dol_print_date($objectlink->dateh, 'day').'</td>';
|
echo '<td class="center">'.dol_print_date($objectlink->dateh, 'day').'</td>';
|
||||||
echo '<td class="right">';
|
echo '<td class="right">';
|
||||||
if ($user->rights->adherent->lire) {
|
if ($user->hasRight('adherent', 'lire')) {
|
||||||
$total = $total + $objectlink->amount;
|
$total = $total + $objectlink->amount;
|
||||||
echo price($objectlink->amount);
|
echo price($objectlink->amount);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -171,7 +171,7 @@ if ($action == 'add' && $user->hasRight('adherent', 'configurer')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'update' && $user->rights->adherent->configurer) {
|
if ($action == 'update' && $user->hasRight('adherent', 'configurer')) {
|
||||||
$object->fetch($rowid);
|
$object->fetch($rowid);
|
||||||
|
|
||||||
$object->oldcopy = dol_clone($object);
|
$object->oldcopy = dol_clone($object);
|
||||||
@ -207,7 +207,7 @@ if ($action == 'update' && $user->rights->adherent->configurer) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'confirm_delete' && !empty($user->rights->adherent->configurer)) {
|
if ($action == 'confirm_delete' && $user->hasRight('adherent', 'configurer')) {
|
||||||
$object->fetch($rowid);
|
$object->fetch($rowid);
|
||||||
$res = $object->delete();
|
$res = $object->delete();
|
||||||
|
|
||||||
@ -257,7 +257,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$newcardbutton = '';
|
$newcardbutton = '';
|
||||||
if ($user->rights->adherent->configurer) {
|
if ($user->hasRight('adherent', 'configurer')) {
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewMemberType'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/type.php?action=create');
|
$newcardbutton .= dolGetButtonTitle($langs->trans('NewMemberType'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/type.php?action=create');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -323,7 +323,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
|||||||
print '<td class="center">'.yn($objp->caneditamount).'</td>';
|
print '<td class="center">'.yn($objp->caneditamount).'</td>';
|
||||||
print '<td class="center">'.yn($objp->vote).'</td>';
|
print '<td class="center">'.yn($objp->vote).'</td>';
|
||||||
print '<td class="center">'.$membertype->getLibStatut(5).'</td>';
|
print '<td class="center">'.$membertype->getLibStatut(5).'</td>';
|
||||||
if ($user->rights->adherent->configurer) {
|
if ($user->hasRight('adherent', 'configurer')) {
|
||||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit&rowid='.$objp->rowid.'">'.img_edit().'</a></td>';
|
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit&rowid='.$objp->rowid.'">'.img_edit().'</a></td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="right"> </td>';
|
print '<td class="right"> </td>';
|
||||||
|
|||||||
@ -71,7 +71,7 @@ if ($action == 'delete' && GETPOST('langtodelete', 'alpha')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add translation
|
// Add translation
|
||||||
if ($action == 'vadd' && $cancel != $langs->trans("Cancel") && $user->rights->adherent->configurer) {
|
if ($action == 'vadd' && $cancel != $langs->trans("Cancel") && $user->hasRight('adherent', 'configurer')) {
|
||||||
$object = new AdherentType($db);
|
$object = new AdherentType($db);
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$current_lang = $langs->getDefaultLang();
|
$current_lang = $langs->getDefaultLang();
|
||||||
@ -99,7 +99,7 @@ if ($action == 'vadd' && $cancel != $langs->trans("Cancel") && $user->rights->ad
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Edit translation
|
// Edit translation
|
||||||
if ($action == 'vedit' && $cancel != $langs->trans("Cancel") && $user->rights->adherent->configurer) {
|
if ($action == 'vedit' && $cancel != $langs->trans("Cancel") && $user->hasRight('adherent', 'configurer')) {
|
||||||
$object = new AdherentType($db);
|
$object = new AdherentType($db);
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$current_lang = $langs->getDefaultLang();
|
$current_lang = $langs->getDefaultLang();
|
||||||
@ -125,7 +125,7 @@ if ($action == 'vedit' && $cancel != $langs->trans("Cancel") && $user->rights->a
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete translation
|
// Delete translation
|
||||||
if ($action == 'vdelete' && $cancel != $langs->trans("Cancel") && $user->rights->adherent->configurer) {
|
if ($action == 'vdelete' && $cancel != $langs->trans("Cancel") && $user->hasRight('adherent', 'configurer')) {
|
||||||
$object = new AdherentType($db);
|
$object = new AdherentType($db);
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$langtodelete = GETPOST('langdel', 'alpha');
|
$langtodelete = GETPOST('langdel', 'alpha');
|
||||||
|
|||||||
@ -42,14 +42,14 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
$result = $object->fetch($id, $ref);
|
$result = $object->fetch($id, $ref);
|
||||||
|
|
||||||
// Define variables to know what current user can do on users
|
// Define variables to know what current user can do on users
|
||||||
$canadduser = ($user->admin || $user->rights->user->user->creer);
|
$canadduser = ($user->admin || $user->hasRight('user', 'user', 'creer'));
|
||||||
// Define variables to know what current user can do on properties of user linked to edited member
|
// Define variables to know what current user can do on properties of user linked to edited member
|
||||||
if ($object->user_id) {
|
if ($object->user_id) {
|
||||||
// $User is the user who edits, $object->user_id is the id of the related user in the edited member
|
// $User is the user who edits, $object->user_id is the id of the related user in the edited member
|
||||||
$caneditfielduser = ((($user->id == $object->user_id) && $user->rights->user->self->creer)
|
$caneditfielduser = ((($user->id == $object->user_id) && $user->hasRight('user', 'self', 'creer'))
|
||||||
|| (($user->id != $object->user_id) && $user->rights->user->user->creer));
|
|| (($user->id != $object->user_id) && $user->hasRight('user', 'user', 'creer')));
|
||||||
$caneditpassworduser = ((($user->id == $object->user_id) && $user->rights->user->self->password)
|
$caneditpassworduser = ((($user->id == $object->user_id) && $user->hasRight('user', 'self', 'password'))
|
||||||
|| (($user->id != $object->user_id) && $user->rights->user->user->password));
|
|| (($user->id != $object->user_id) && $user->hasRight('user', 'user', 'password')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -487,7 +487,7 @@ if (empty($conf->api->enabled) && empty($conf->webservices->enabled)) {
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (!empty($conf->api->enabled)) {
|
if (!empty($conf->api->enabled)) {
|
||||||
print '<strong>API_ENDPOINT_RULES</strong> = '.(empty($conf->global->API_ENDPOINT_RULES) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Example").': login:0,users:0,setup:1,status:1,tickets:1,...)</span>' : $conf->global->API_ENDPOINT_RULES)."<br>\n";
|
print '<strong>API_ENDPOINT_RULES</strong> = '.getDolGlobalString('API_ENDPOINT_RULES', '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Example").': login:0,users:0,setup:1,status:1,tickets:1,...)</span>')."<br>\n";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -501,19 +501,19 @@ print '<br>';
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans("OtherSetup"), '', 'folder');
|
print load_fiche_titre($langs->trans("OtherSetup"), '', 'folder');
|
||||||
|
|
||||||
print '<strong>MAIN_ALLOW_SVG_FILES_AS_IMAGES</strong> = '.(empty($conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES) ? '0' : $conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES).' <span class="opacitymedium">('.$langs->trans("Recommended").': 0)</span><br>';
|
print '<strong>MAIN_ALLOW_SVG_FILES_AS_IMAGES</strong> = '.getDolGlobalString('MAIN_ALLOW_SVG_FILES_AS_IMAGES', '0').' <span class="opacitymedium">('.$langs->trans("Recommended").': 0)</span><br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<strong>MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE</strong> = '.(empty($conf->global->MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE).' <span class="opacitymedium">('.$langs->trans("Recommended").': 1)</span><br>';
|
print '<strong>MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE</strong> = '.getDolGlobalString('MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').' <span class="opacitymedium">('.$langs->trans("Recommended").': 1)</span><br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
//print '<strong>'.$langs->trans("PasswordEncryption").'</strong>: ';
|
//print '<strong>'.$langs->trans("PasswordEncryption").'</strong>: ';
|
||||||
print '<strong>MAIN_SECURITY_HASH_ALGO</strong> = '.(empty($conf->global->MAIN_SECURITY_HASH_ALGO) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_SECURITY_HASH_ALGO)." ";
|
print '<strong>MAIN_SECURITY_HASH_ALGO</strong> = '.getDolGlobalString('MAIN_SECURITY_HASH_ALGO', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>')." ";
|
||||||
if (empty($conf->global->MAIN_SECURITY_HASH_ALGO)) {
|
if (empty($conf->global->MAIN_SECURITY_HASH_ALGO)) {
|
||||||
print '<span class="opacitymedium"> If unset: \'md5\'</span>';
|
print '<span class="opacitymedium"> If unset: \'md5\'</span>';
|
||||||
}
|
}
|
||||||
if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
|
if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
|
||||||
print '<br><strong>MAIN_SECURITY_SALT</strong> = '.(empty($conf->global->MAIN_SECURITY_SALT) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_SECURITY_SALT).'<br>';
|
print '<br><strong>MAIN_SECURITY_SALT</strong> = '.getDolGlobalString('MAIN_SECURITY_SALT', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').'<br>';
|
||||||
} else {
|
} else {
|
||||||
print '<span class="opacitymedium">('.$langs->trans("Recommended").': password_hash)</span>';
|
print '<span class="opacitymedium">('.$langs->trans("Recommended").': password_hash)</span>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -528,10 +528,10 @@ if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
|
|||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<strong>MAIN_SECURITY_ANTI_SSRF_SERVER_IP</strong> = '.(empty($conf->global->MAIN_SECURITY_ANTI_SSRF_SERVER_IP) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span> <span class="opacitymedium">('.$langs->trans("Recommended").': List of static IPs of server separated with coma - '.$langs->trans("Note").': common loopback ip like 127.*.*.*, [::1] are already added)</span>' : $conf->global->MAIN_SECURITY_ANTI_SSRF_SERVER_IP)."<br>";
|
print '<strong>MAIN_SECURITY_ANTI_SSRF_SERVER_IP</strong> = '.getDolGlobalString('MAIN_SECURITY_ANTI_SSRF_SERVER_IP', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span> <span class="opacitymedium">('.$langs->trans("Recommended").': List of static IPs of server separated with coma - '.$langs->trans("Note").': common loopback ip like 127.*.*.*, [::1] are already added)</span>')."<br>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<strong>MAIN_SECURITY_CSRF_WITH_TOKEN</strong> = '.(empty($conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN).' <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or").' 2)</span>'."<br>";
|
print '<strong>MAIN_SECURITY_CSRF_WITH_TOKEN</strong> = '.getDolGlobalString('MAIN_SECURITY_CSRF_WITH_TOKEN', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').' <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or").' 2)</span>'."<br>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -559,31 +559,32 @@ if ($execmethod == 2) {
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<strong>MAIN_RESTRICTHTML_ONLY_VALID_HTML</strong> = '.(empty($conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': 1)</span>' : $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML)."<br>";
|
print '<strong>MAIN_RESTRICTHTML_ONLY_VALID_HTML</strong> = '.getDolGlobalString('MAIN_RESTRICTHTML_ONLY_VALID_HTML', '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': 1)</span>')."<br>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<strong>MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES</strong> = '.(empty($conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': 1)</span>' : $conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES)."<br>";
|
print '<strong>MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES</strong> = '.getDolGlobalString('MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES', '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': 1)</span>')."<br>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<strong>MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL</strong> = '.(empty($conf->global->MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or").' 0)</span>' : $conf->global->MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL)."<br>";
|
print '<strong>MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL</strong> = '.getDolGlobalString('MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL', '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or").' 0)</span>')."<br>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<strong>MAIN_SECURITY_FORCECSP</strong> = '.(empty($conf->global->MAIN_SECURITY_FORCECSP) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_SECURITY_FORCECSP).' <span class="opacitymedium">('.$langs->trans("Example").": \"frame-ancestors 'self'; default-src 'self'; img-src *;\")</span><br>";
|
print '<strong>MAIN_SECURITY_FORCECSP</strong> = '.getDolGlobalString('MAIN_SECURITY_FORCECSP', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').' <span class="opacitymedium">('.$langs->trans("Example").": \"frame-ancestors 'self'; default-src 'self'; img-src *;\")</span><br>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<strong>MAIN_SECURITY_FORCERP</strong> = '.(empty($conf->global->MAIN_SECURITY_FORCERP) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_SECURITY_FORCERP).' <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or")." \"same-origin\" so browser doesn't send any referrer when going into another web site domain)</span><br>";
|
print '<strong>MAIN_SECURITY_FORCERP</strong> = '.getDolGlobalString('MAIN_SECURITY_FORCERP', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').' <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or")." \"same-origin\" so browser doesn't send any referrer when going into another web site domain)</span><br>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<strong>WEBSITE_MAIN_SECURITY_FORCECSP</strong> = '.(empty($conf->global->WEBSITE_MAIN_SECURITY_FORCECSP) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->WEBSITE_MAIN_SECURITY_FORCECSP).' <span class="opacitymedium">('.$langs->trans("Example").": \"frame-ancestors 'self'; default-src 'self'; style-src https://cdnjs.cloudflare.com https://fonts.googleapis.com; script-src https://cdn.transifex.com https://www.googletagmanager.com; object-src https://youtube.com; frame-src https://youtube.com; img-src *;\")</span><br>";
|
print '<strong>WEBSITE_MAIN_SECURITY_FORCECSP</strong> = '.getDolGlobalString('WEBSITE_MAIN_SECURITY_FORCECSP', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>');
|
||||||
|
print ' <span class="opacitymedium">('.$langs->trans("Example").": \"frame-ancestors 'self'; default-src 'self'; style-src https://cdnjs.cloudflare.com https://fonts.googleapis.com; script-src https://cdn.transifex.com https://www.googletagmanager.com; object-src https://youtube.com; frame-src https://youtube.com; img-src *;\")</span><br>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<strong>WEBSITE_MAIN_SECURITY_FORCERP</strong> = '.(empty($conf->global->WEBSITE_MAIN_SECURITY_FORCERP) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->WEBSITE_MAIN_SECURITY_FORCERP).' <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or")." \"strict-origin-when-cross-origin\")</span><br>";
|
print '<strong>WEBSITE_MAIN_SECURITY_FORCERP</strong> = '.getDolGlobalString('WEBSITE_MAIN_SECURITY_FORCERP', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').' <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or")." \"strict-origin-when-cross-origin\")</span><br>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<strong>WEBSITE_MAIN_SECURITY_FORCESTS</strong> = '.(empty($conf->global->WEBSITE_MAIN_SECURITY_FORCESTS) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->WEBSITE_MAIN_SECURITY_FORCESTS).' <span class="opacitymedium">('.$langs->trans("Example").": \"max-age=31536000; includeSubDomains\")</span><br>";
|
print '<strong>WEBSITE_MAIN_SECURITY_FORCESTS</strong> = '.getDolGlobalString('>WEBSITE_MAIN_SECURITY_FORCESTS', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').' <span class="opacitymedium">('.$langs->trans("Example").": \"max-age=31536000; includeSubDomains\")</span><br>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<strong>WEBSITE_MAIN_SECURITY_FORCEPP</strong> = '.(empty($conf->global->WEBSITE_MAIN_SECURITY_FORCEPP) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->WEBSITE_MAIN_SECURITY_FORCEPP).' <span class="opacitymedium">('.$langs->trans("Example").": \"camera: 'none'; microphone: 'none';\")</span><br>";
|
print '<strong>WEBSITE_MAIN_SECURITY_FORCEPP</strong> = '.getDolGlobalString('WEBSITE_MAIN_SECURITY_FORCEPP', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').' <span class="opacitymedium">('.$langs->trans("Example").": \"camera: 'none'; microphone: 'none';\")</span><br>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -598,16 +599,13 @@ print '</span>';
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
$urlexamplebase = 'https://github.com/Dolibarr/dolibarr/blob/develop/dev/setup/fail2ban/filter.d/';
|
$urlexamplebase = 'https://github.com/Dolibarr/dolibarr/blob/develop/dev/setup/fail2ban/filter.d/';
|
||||||
print '- Login process (see <a target="_blank" rel="noopener" href="'.$urlexamplebase.'web-dolibarr-rulesbruteforce.conf">fail2ban example on GitHub</a>)<br>';
|
print '- Login process (see <a target="_blank" rel="noopener" href="'.$urlexamplebase.'web-dolibarr-rulesbruteforce.conf">fail2ban example on GitHub</a>)<br>';
|
||||||
print '- '.DOL_URL_ROOT.'/passwordforgotten.php (see <a target="_blank" rel="noopener" href="'.$urlexamplebase.'web-dolibarr-rulespassgorgotten.conf">fail2ban example on GitHub</a>)<br>';
|
print '- '.DOL_URL_ROOT.'/passwordforgotten.php (see <a target="_blank" rel="noopener" href="'.$urlexamplebase.'web-dolibarr-rulespassforgotten.conf">fail2ban example on GitHub</a>)<br>';
|
||||||
print '- '.DOL_URL_ROOT.'/public/* (see <a target="_blank" rel="noopener" href="'.$urlexamplebase.'web-dolibarr-limitpublic.conf">fail2ban example on GitHub</a>)<br>';
|
print '- '.DOL_URL_ROOT.'/public/* (see <a target="_blank" rel="noopener" href="'.$urlexamplebase.'web-dolibarr-limitpublic.conf">fail2ban example on GitHub</a>)<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
$urlexamplebase = 'https://github.com/Dolibarr/dolibarr/blob/develop/dev/setup/apache/';
|
$urlexamplebase = 'https://github.com/Dolibarr/dolibarr/blob/develop/dev/setup/apache/';
|
||||||
print '- You can also protect the application using a HTTP Basic authentication layer (see <a target="_blank" rel="noopener" href="'.$urlexamplebase.'virtualhost">apache2 virtualhost example on GitHub</a>)<br>';
|
print '- You can also protect the application using a HTTP Basic authentication layer (see <a target="_blank" rel="noopener" href="'.$urlexamplebase.'virtualhost">apache2 virtualhost example on GitHub</a>)<br>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -402,7 +402,7 @@ if (empty($reshook) && $action == 'add') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$to = $adh->makeSubstitution($conf->global->MAIN_INFO_SOCIETE_MAIL);
|
$to = $adh->makeSubstitution($conf->global->MAIN_INFO_SOCIETE_MAIL);
|
||||||
$from = $conf->global->ADHERENT_MAIL_FROM;
|
$from = getDolGlobalString('ADHERENT_MAIL_FROM');
|
||||||
$mailfile = new CMailFile(
|
$mailfile = new CMailFile(
|
||||||
'['.$appli.'] '.$conf->global->ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT,
|
'['.$appli.'] '.$conf->global->ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT,
|
||||||
$to,
|
$to,
|
||||||
|
|||||||
@ -342,9 +342,9 @@ div.paymentbordline
|
|||||||
?>
|
?>
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overfloy-y: scroll;
|
overfloy-y: scroll;
|
||||||
<?
|
<?php
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user