diff options
author | Andreas Gohr <andi@splitbrain.org> | 2023-12-01 15:18:16 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2023-12-01 15:18:16 +0100 |
commit | 7af0b2864dad652705c2a12f2f7b817264680326 (patch) | |
tree | 48bcb0a66d6f17093672b7b47d79ba62e17b9ab9 | |
parent | 29af7622c7a2f4133696d594a2e61705d9a9a1d6 (diff) | |
download | dokuwiki-7af0b2864dad652705c2a12f2f7b817264680326.tar.gz dokuwiki-7af0b2864dad652705c2a12f2f7b817264680326.zip |
Adjust ACL remote component to new system
There is no need to implement getMethods anymore. All data comes from
reflection
-rw-r--r-- | lib/plugins/acl/remote.php | 49 |
1 files changed, 10 insertions, 39 deletions
diff --git a/lib/plugins/acl/remote.php b/lib/plugins/acl/remote.php index 267a63fe5..762a2aca4 100644 --- a/lib/plugins/acl/remote.php +++ b/lib/plugins/acl/remote.php @@ -9,39 +9,10 @@ use dokuwiki\Remote\AccessDeniedException; class remote_plugin_acl extends RemotePlugin { /** - * Returns details about the remote plugin methods - * - * @return array Information about all provided methods. {@see dokuwiki\Remote\RemoteAPI} - */ - public function getMethods() - { - return [ - 'listAcls' => [ - 'args' => [], - 'return' => 'Array of ACLs {scope, user, permission}', - 'name' => 'listAcls', - 'doc' => 'Get the list of all ACLs' - ], - 'addAcl' => [ - 'args' => ['string', 'string', 'int'], - 'return' => 'int', - 'name' => 'addAcl', - 'doc' => 'Adds a new ACL rule.' - ], - 'delAcl' => [ - 'args' => ['string', 'string'], - 'return' => 'int', - 'name' => 'delAcl', - 'doc' => 'Delete an existing ACL rule.' - ] - ]; - } - - /** - * List all ACL config entries + * Get the list all ACL config entries * + * @return array {Scope: ACL}, where ACL = dictionnary {user/group: permissions_int} * @throws AccessDeniedException - * @return dictionary {Scope: ACL}, where ACL = dictionnary {user/group: permissions_int} */ public function listAcls() { @@ -58,13 +29,13 @@ class remote_plugin_acl extends RemotePlugin } /** - * Add a new entry to ACL config + * Add a new ACL rule to the config * - * @param string $scope - * @param string $user - * @param int $level see also inc/auth.php + * @param string $scope The page or namespace to apply the ACL to + * @param string $user The user or group to apply the ACL to + * @param int $level The permission level to set + * @return bool If adding the ACL rule was successful * @throws AccessDeniedException - * @return bool */ public function addAcl($scope, $user, $level) { @@ -83,10 +54,10 @@ class remote_plugin_acl extends RemotePlugin /** * Remove an entry from ACL config * - * @param string $scope - * @param string $user + * @param string $scope The page or namespace the ACL applied to + * @param string $user The user or group the ACL applied to + * @return bool If removing the ACL rule was successful * @throws AccessDeniedException - * @return bool */ public function delAcl($scope, $user) { |