diff options
author | Mohamed Amine BERGAOUI <mabergaoui@gmail.com> | 2013-07-30 10:13:14 +0200 |
---|---|---|
committer | Mohamed Amine BERGAOUI <mabergaoui@gmail.com> | 2013-07-30 10:13:14 +0200 |
commit | d90a68f39f7f78f2ce0b475700f22750ae3f0b14 (patch) | |
tree | b14b0072ac1dfdc8028ca506c53bad65070fd3f3 | |
parent | 7d8a6abbb21979fd77dca10275ebb8e01a04b6e4 (diff) | |
download | rpg-d90a68f39f7f78f2ce0b475700f22750ae3f0b14.tar.gz rpg-d90a68f39f7f78f2ce0b475700f22750ae3f0b14.tar.bz2 |
adding ACL handlers to xmlrpc
-rw-r--r-- | inc/RemoteAPICore.php | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 4c940b39e..022dc37ed 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -149,8 +149,17 @@ 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.' + ), ); } @@ -767,6 +776,17 @@ 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); @@ -779,3 +799,4 @@ class RemoteAPICore { } + |