diff options
author | Dominik Eckelmann <deckelmann@gmail.com> | 2012-01-08 14:54:53 +0100 |
---|---|---|
committer | Dominik Eckelmann <deckelmann@gmail.com> | 2012-01-08 14:54:53 +0100 |
commit | a317247b19c498f4292480110cf0e0a1ce9780e8 (patch) | |
tree | b428679bf3a62da9d19355bd6df097df54796667 /inc | |
parent | eb20307ad68614b8834c804eeade389967db5ed4 (diff) | |
download | rpg-a317247b19c498f4292480110cf0e0a1ce9780e8.tar.gz rpg-a317247b19c498f4292480110cf0e0a1ce9780e8.tar.bz2 |
updated remote hasAccess function
Diffstat (limited to 'inc')
-rw-r--r-- | inc/remote.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/inc/remote.php b/inc/remote.php index e18c71092..94d428e8c 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -71,7 +71,6 @@ class RemoteAPI { * @return array with information to all available methods */ public function getMethods() { - $this->forceAccess(); return array_merge($this->getCoreMethods(), $this->getPluginMethods()); } @@ -122,10 +121,18 @@ class RemoteAPI { */ public function hasAccess() { global $conf; - if (!isset($conf['remote'])) { + global $USERINFO; + if (!$conf['remote']) { return false; } - return $conf['remote']; + if(!$conf['useacl']) { + return true; + } + if(trim($conf['remoteuser']) == '') { + return true; + } + + return auth_isMember($conf['remoteuser'], $_SERVER['REMOTE_USER'], (array) $USERINFO['grps']); } /** |