diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 022dc37ed8986b06a3d11445408a26ea14e748b2..4c940b39ede43a17905efc318802c5d040317b82 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -149,17 +149,8 @@ class RemoteAPICore { 'return' => 'int', 'doc' => 'Returns 2 with the supported RPC API version.', 'public' => '1' - ), 'dokuwiki.addAcl' => array( - 'args' => array('string','string','int'), - 'return' => 'int', - 'name' => 'addAcl', - 'doc' => 'Adds a new ACL rule.' - ), 'dokuwiki.delAcl' => array( - 'args' => array('string','string'), - 'return' => 'int', - 'name' => 'delAcl', - 'doc' => 'Delete an existing ACL rule.' - ), + ), + ); } @@ -776,17 +767,6 @@ class RemoteAPICore { return $ok; } - - - function addAcl($scope, $user, $level){ - $apa = new admin_plugin_acl(); - return $apa->_acl_add($scope, $user, $level); - } - - function delAcl($scope, $user){ - $apa = new admin_plugin_acl(); - return $apa->_acl_del($scope, $user); - } private function resolvePageId($id) { $id = cleanID($id); @@ -799,4 +779,3 @@ class RemoteAPICore { } - diff --git a/lib/plugins/acl/remote.php b/lib/plugins/acl/remote.php new file mode 100644 index 0000000000000000000000000000000000000000..8210e5414f152436b980071f7316104b0c901c5e --- /dev/null +++ b/lib/plugins/acl/remote.php @@ -0,0 +1,32 @@ +<?php + +class remote_plugin_acl extends DokuWiki_Remote_Plugin { + function _getMethods() { + return array( + 'plugin.acl.addAcl' => array( + 'args' => array('string','string','int'), + 'return' => 'int', + 'name' => 'addAcl', + 'doc' => 'Adds a new ACL rule.' + ), 'plugin.delAcl' => array( + 'args' => array('string','string'), + 'return' => 'int', + 'name' => 'delAcl', + 'doc' => 'Delete an existing ACL rule.' + ), + ); + } + + + function addAcl($scope, $user, $level){ + $apa = new admin_plugin_acl(); + return $apa->_acl_add($scope, $user, $level); + } + + function delAcl($scope, $user){ + $apa = new admin_plugin_acl(); + return $apa->_acl_del($scope, $user); + } +} + +?>