mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-16 15:33:02 +01:00
LSsession : always granted access to attribute/relation/customAction/customSearchAction in CLI mode
This commit is contained in:
parent
53b15e89f8
commit
1ad7f9e462
1 changed files with 20 additions and 0 deletions
|
@ -1979,6 +1979,11 @@ class LSsession {
|
||||||
if (!self :: loadLSobject($LSobject)) {
|
if (!self :: loadLSobject($LSobject)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Access always granted in CLI mode
|
||||||
|
if (php_sapi_name() == "cli")
|
||||||
|
return true;
|
||||||
|
|
||||||
if ($dn) {
|
if ($dn) {
|
||||||
$whoami = self :: whoami($dn);
|
$whoami = self :: whoami($dn);
|
||||||
if ($dn==self :: getLSuserObject() -> getValue('dn')) {
|
if ($dn==self :: getLSuserObject() -> getValue('dn')) {
|
||||||
|
@ -2116,6 +2121,11 @@ class LSsession {
|
||||||
$relConf=LSconfig :: get('LSobjects.'.$LSobject.'.LSrelation.'.$relationName);
|
$relConf=LSconfig :: get('LSobjects.'.$LSobject.'.LSrelation.'.$relationName);
|
||||||
if (!is_array($relConf))
|
if (!is_array($relConf))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Access always granted in CLI mode
|
||||||
|
if (php_sapi_name() == "cli")
|
||||||
|
return true;
|
||||||
|
|
||||||
$whoami = self :: whoami($dn);
|
$whoami = self :: whoami($dn);
|
||||||
|
|
||||||
if (($right=='w') || ($right=='r')) {
|
if (($right=='w') || ($right=='r')) {
|
||||||
|
@ -2172,6 +2182,11 @@ class LSsession {
|
||||||
$conf=LSconfig :: get('LSobjects.'.$LSobject.'.customActions.'.$customActionName);
|
$conf=LSconfig :: get('LSobjects.'.$LSobject.'.customActions.'.$customActionName);
|
||||||
if (!is_array($conf))
|
if (!is_array($conf))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Access always granted in CLI mode
|
||||||
|
if (php_sapi_name() == "cli")
|
||||||
|
return true;
|
||||||
|
|
||||||
$whoami = self :: whoami($dn);
|
$whoami = self :: whoami($dn);
|
||||||
|
|
||||||
if (isset($conf['rights']) && is_array($conf['rights'])) {
|
if (isset($conf['rights']) && is_array($conf['rights'])) {
|
||||||
|
@ -2198,6 +2213,11 @@ class LSsession {
|
||||||
$conf=LSconfig :: get('LSobjects.'.$LSsearch -> LSobject.'.LSsearch.customActions.'.$customActionName);
|
$conf=LSconfig :: get('LSobjects.'.$LSsearch -> LSobject.'.LSsearch.customActions.'.$customActionName);
|
||||||
if (!is_array($conf))
|
if (!is_array($conf))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Access always granted in CLI mode
|
||||||
|
if (php_sapi_name() == "cli")
|
||||||
|
return true;
|
||||||
|
|
||||||
$dn=$LSsearch -> basedn;
|
$dn=$LSsearch -> basedn;
|
||||||
if (is_null($dn)) $dn=self::getTopDn();
|
if (is_null($dn)) $dn=self::getTopDn();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue