Commit: 06a7fb9273da3c44a5e76479e06adc37e46fea2b Author: Christoph M. Becker <[email protected]> Thu, 19 Mar 2015 14:48:30 +0100 Parents: c8e15ecb857d50439a6cdca9e7d393ab91933b83 Branches: master
Link: http://git.php.net/?p=web/wiki.git;a=commitdiff;h=06a7fb9273da3c44a5e76479e06adc37e46fea2b Log: updated to 2014-09-29c "Hrun" Changed paths: M dokuwiki/VERSION M dokuwiki/doku.php M dokuwiki/lib/plugins/acl/remote.php Diff: diff --git a/dokuwiki/VERSION b/dokuwiki/VERSION index b85f44e..6b338d4 100644 --- a/dokuwiki/VERSION +++ b/dokuwiki/VERSION @@ -1 +1 @@ -2014-09-29b "Hrun" +2014-09-29c "Hrun" diff --git a/dokuwiki/doku.php b/dokuwiki/doku.php index 1477f80..16f48fc 100644 --- a/dokuwiki/doku.php +++ b/dokuwiki/doku.php @@ -9,7 +9,7 @@ */ // update message version -$updateVersion = 46.2; +$updateVersion = 46.3; // xdebug_start_profiling(); diff --git a/dokuwiki/lib/plugins/acl/remote.php b/dokuwiki/lib/plugins/acl/remote.php index 6d5201c..9433b77 100644 --- a/dokuwiki/lib/plugins/acl/remote.php +++ b/dokuwiki/lib/plugins/acl/remote.php @@ -17,12 +17,39 @@ class remote_plugin_acl extends DokuWiki_Remote_Plugin { ); } - function addAcl($scope, $user, $level){ + /** + * Add a new entry to ACL config + * + * @param string $scope + * @param string $user + * @param int $level see also inc/auth.php + * @throws RemoteAccessDeniedException + * @return bool + */ + public function addAcl($scope, $user, $level){ + if(!auth_isadmin()) { + throw new RemoteAccessDeniedException('You are not allowed to access ACLs, superuser permission is required', 114); + } + + /** @var admin_plugin_acl $apa */ $apa = plugin_load('admin', 'acl'); return $apa->_acl_add($scope, $user, $level); } - function delAcl($scope, $user){ + /** + * Remove an entry from ACL config + * + * @param string $scope + * @param string $user + * @throws RemoteAccessDeniedException + * @return bool + */ + public function delAcl($scope, $user){ + if(!auth_isadmin()) { + throw new RemoteAccessDeniedException('You are not allowed to access ACLs, superuser permission is required', 114); + } + + /** @var admin_plugin_acl $apa */ $apa = plugin_load('admin', 'acl'); return $apa->_acl_del($scope, $user); } -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
