Fix remove use of captcha on backoffice for ticket creation

This commit is contained in:
Laurent Destailleur
2021-06-05 02:18:45 +02:00
parent b77f2be2e1
commit b6ba1de3b3
2 changed files with 3 additions and 2 deletions

View File

@@ -259,7 +259,7 @@ class FormTicket
$doleditor->Create();
print '</td></tr>';
if (!empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA)) {
if ($public && !empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA)) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
print '<tr><td class="titlefield"><label for="email"><span class="fieldrequired">'.$langs->trans("SecurityCode").'</span></label></td><td>';
print '<span class="span-icon-security inline-block">';

View File

@@ -53,6 +53,7 @@ $ref = GETPOST('ref', 'alpha');
$projectid = GETPOST('projectid', 'int');
$cancel = GETPOST('cancel', 'alpha');
$action = GETPOST('action', 'aZ09');
$backtopage = GETPOST('$backtopage', 'alpha');
$notifyTiers = GETPOST("notify_tiers_at_create", 'alpha');
@@ -152,7 +153,7 @@ if (empty($reshook)) {
}
// Action to add an action (not a message)
if (GETPOST('add', 'alpha') && $user->rights->ticket->write) {
if (GETPOST('add', 'alpha') && !empty($user->rights->ticket->write)) {
$error = 0;
if (!GETPOST("subject", 'alphanohtml')) {