mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
replacing ->global-> with getDolGlobalString because phan complained in a different commit (#30589)
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
This commit is contained in:
@@ -2262,7 +2262,7 @@ class Setup extends DolibarrApi
|
||||
global $conf, $mysoc;
|
||||
|
||||
if (!DolibarrApiAccess::$user->admin
|
||||
&& (!getDolGlobalString('API_LOGINS_ALLOWED_FOR_GET_COMPANY') || DolibarrApiAccess::$user->login != $conf->global->API_LOGINS_ALLOWED_FOR_GET_COMPANY)) {
|
||||
&& (!getDolGlobalString('API_LOGINS_ALLOWED_FOR_GET_COMPANY') || DolibarrApiAccess::$user->login != getDolGlobalString('API_LOGINS_ALLOWED_FOR_GET_COMPANY'))) {
|
||||
throw new RestException(403, 'Error API open to admin users only or to the users with logins defined into constant API_LOGINS_ALLOWED_FOR_GET_COMPANY');
|
||||
}
|
||||
|
||||
@@ -2414,7 +2414,7 @@ class Setup extends DolibarrApi
|
||||
global $langs, $conf;
|
||||
|
||||
if (!DolibarrApiAccess::$user->admin
|
||||
&& (!getDolGlobalString('API_LOGINS_ALLOWED_FOR_INTEGRITY_CHECK') || DolibarrApiAccess::$user->login != $conf->global->API_LOGINS_ALLOWED_FOR_INTEGRITY_CHECK)) {
|
||||
&& (!getDolGlobalString('API_LOGINS_ALLOWED_FOR_INTEGRITY_CHECK') || DolibarrApiAccess::$user->login != getDolGlobalString('API_LOGINS_ALLOWED_FOR_INTEGRITY_CHECK'))) {
|
||||
throw new RestException(403, 'Error API open to admin users only or to the users with logins defined into constant API_LOGINS_ALLOWED_FOR_INTEGRITY_CHECK');
|
||||
}
|
||||
|
||||
@@ -2732,7 +2732,7 @@ class Setup extends DolibarrApi
|
||||
global $conf;
|
||||
|
||||
if (!DolibarrApiAccess::$user->admin
|
||||
&& (!getDolGlobalString('API_LOGINS_ALLOWED_FOR_GET_MODULES') || DolibarrApiAccess::$user->login != $conf->global->API_LOGINS_ALLOWED_FOR_GET_MODULES)) {
|
||||
&& (!getDolGlobalString('API_LOGINS_ALLOWED_FOR_GET_MODULES') || DolibarrApiAccess::$user->login != getDolGlobalString('API_LOGINS_ALLOWED_FOR_GET_MODULES'))) {
|
||||
throw new RestException(403, 'Error API open to admin users only or to the users with logins defined into constant API_LOGINS_ALLOWED_FOR_GET_MODULES');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user