Skip to content

Commit

Permalink
Evarisk#1780 [Public] fix: fatal hasRight function if no user in page
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Mar 22, 2024
1 parent d8ccdfd commit aa4d695
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
3 changes: 0 additions & 3 deletions public/control/public_control.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
* \brief Public page to view control.
*/

if (!defined('NOREQUIREUSER')) {
define('NOREQUIREUSER', '1');
}
if (!defined('NOTOKENRENEWAL')) {
define('NOTOKENRENEWAL', '1');
}
Expand Down
4 changes: 0 additions & 4 deletions public/control/public_control_history.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
* \brief Public page to view control history.
*/

if (!defined('NOREQUIREUSER')) {
define('NOREQUIREUSER', '1');
}
if (!defined('NOTOKENRENEWAL')) {
define('NOTOKENRENEWAL', '1');
}
Expand Down Expand Up @@ -58,7 +55,6 @@
// Load Dolibarr libraries.
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/product/stock/class/productlot.class.php';
require_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php';
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';

// Load DigiQuali libraries.
Expand Down
15 changes: 6 additions & 9 deletions public/survey/public_survey.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,26 @@
* \brief Public page to view survey
*/

if (!defined('NOREQUIREUSER')) {
define('NOREQUIREUSER', '1');
}
if (!defined('NOTOKENRENEWAL')) {
define('NOTOKENRENEWAL', '1');
define('NOTOKENRENEWAL', 1);
}
if (!defined('NOREQUIREMENU')) {
define('NOREQUIREMENU', 1);
}
if (!defined('NOREQUIREHTML')) {
define('NOREQUIREHTML', '1');
define('NOREQUIREHTML', 1);
}
if (!defined('NOLOGIN')) { // This means this output page does not require to be logged.
define('NOLOGIN', '1');
define('NOLOGIN', 1);
}
if (!defined('NOCSRFCHECK')) { // We accept to go on this page from external website.
define('NOCSRFCHECK', '1');
define('NOCSRFCHECK', 1);
}
if (!defined('NOIPCHECK')) { // Do not check IP defined into conf $dolibarr_main_restrict_ip.
define('NOIPCHECK', '1');
define('NOIPCHECK', 1);
}
if (!defined('NOBROWSERNOTIF')) {
define('NOBROWSERNOTIF', '1');
define('NOBROWSERNOTIF', 1);
}

// Load DigiQuali environment
Expand Down

0 comments on commit aa4d695

Please sign in to comment.