diff options
author | Phy <git@phy25.com> | 2020-03-08 18:09:26 -0400 |
---|---|---|
committer | Phy <git@phy25.com> | 2020-03-08 18:09:26 -0400 |
commit | 4bdfdb328896e1009c6b41f5a85aac1f84d5b3a0 (patch) | |
tree | 9288c3ad1e76178f597801d0334ce73bc0bedc59 /_test/mock/AuthDeletePlugin.php | |
parent | 7a0654bebf4826ea3bae330c78ec73080c48d9e3 (diff) | |
download | dokuwiki-remote-argumentcount.tar.gz dokuwiki-remote-argumentcount.zip |
separate some test AuthPlugins to single filesremote-argumentcount
created AuthDeletePlugin and AuthCaseInsensitivePlugin under dokuwiki\test\mock
Diffstat (limited to '_test/mock/AuthDeletePlugin.php')
-rw-r--r-- | _test/mock/AuthDeletePlugin.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/_test/mock/AuthDeletePlugin.php b/_test/mock/AuthDeletePlugin.php new file mode 100644 index 000000000..82e96f2a6 --- /dev/null +++ b/_test/mock/AuthDeletePlugin.php @@ -0,0 +1,28 @@ +<?php + +namespace dokuwiki\test\mock; + +/** + * Class dokuwiki\Plugin\DokuWiki_Auth_Plugin + */ +class AuthDeletePlugin extends AuthPlugin { + + public $loggedOff = false; + + public function __construct($canDeleteUser = true) { + $this->cando['delUser'] = $canDeleteUser; + } + + public function checkPass($user, $pass) { + return $pass == 'password'; + } + + public function deleteUsers($users) { + return in_array($_SERVER['REMOTE_USER'], $users); + } + + public function logoff() { + $this->loggedOff = true; + } + +}
\ No newline at end of file |