Lines Matching +full:check +full:- +full:pass -(+path:inc +path:lang) -(+path:lib +path:plugins +path:lang) -(+path:lib +path:tpl +path:dokuwiki +path:lang)

26  *          'public' => 1/0 - method bypass default group check (used by login)
53 return array_merge($this->getCoreMethods(), $this->getPluginMethods());
60 * Here you can pass a non-default RemoteAPICore instance. (for mocking)
65 if (!$this->coreMethods) {
67 $this->coreMethods = (new LegacyApiCore())->getMethods();
69 $this->coreMethods = $apiCore->getMethods();
72 return $this->coreMethods;
82 if ($this->pluginMethods) return $this->pluginMethods;
94 $methods = $plugin->getMethods();
98 $e->getMessage(),
99 $e->getFile(),
100 $e->getLine()
106 $this->pluginMethods["plugin.$pluginName.$method"] = $call;
110 return $this->pluginMethods;
117 * @param array $args arguments to pass to the given method
127 // pre-flight checks
128 $this->ensureApiIsEnabled();
129 $methods = $this->getMethods();
131 throw new RemoteException('Method does not exist', -32603);
133 $this->ensureAccessIsAllowed($methods[$method]);
139 throw new RemoteException($e->getMessage(), -32602);
144 * Check that the API is generally enabled
153 throw new AccessDeniedException('Server Error. API is not enabled in config.', -32604);
158 * Check if the current user is allowed to call the given method
170 if ($method->isPublic()) return; // public methods are always allowed
171 if (!$conf['useacl']) return; // ACL is not enabled, so we can't check users
173 if (auth_isMember($conf['remoteuser'], $INPUT->server->str('REMOTE_USER'), (array)($USERINFO['grps'] ?? []))) {
178 throw new AccessDeniedException('server error. not authorized to call method', -32604);