Home
last modified time | relevance | path

Searched refs:auth (Results 1 – 25 of 51) sorted by relevance

123

/dokuwiki/lib/plugins/authpdo/_test/
H A Dsqlite.test.php97 $auth = new testable_auth_plugin_authpdo();
99 $groups = $auth->selectGroups();
105 $ok = $auth->addGroup('test');
107 $groups = $auth->selectGroups();
117 $auth = new auth_plugin_authpdo();
120 $this->assertFalse($auth->checkPass('nobody', 'nope'));
121 $this->assertFalse($auth->checkPass('admin', 'nope'));
122 $this->assertTrue($auth->checkPass('admin', 'password'));
126 $this->assertFalse($auth->checkPass('admin', 'password'));
127 $this->assertFalse($auth->checkPass('user', md5('password')));
[all …]
H A Dmysql.test.php113 * @param auth_plugin_authpdo $auth
116 protected function runGeneralTests(auth_plugin_authpdo $auth, $users) { argument
118 $info = 'DSN: ' . $auth->getConf('dsn');
119 $this->assertTrue($auth->success, $info);
121 if($auth->canDo('getUsers')) {
122 $list = $auth->retrieveUsers();
126 if($auth->canDo('getGroups')) {
127 $list = $auth->retrieveGroups();
131 if($auth->canDo('getUserCount')) {
132 $count = $auth->getUserCount();
[all …]
/dokuwiki/lib/plugins/usermanager/_test/
H A DRemoteApiTest.php41 global $auth;
42 $auth = new AuthPlugin();
60 $this->assertArrayHasKey('user1', $auth->users);
70 global $auth;
71 $auth = new AuthPlugin();
94 global $auth;
95 $auth = new AuthPlugin();
118 global $auth;
119 $auth = new AuthPlugin();
142 global $auth;
[all …]
H A Dcsv_import.test.php50 global $auth;
51 $before_users = $auth->retrieveUsers();
56 $after_users = $auth->retrieveUsers();
77 global $auth;
78 $oldauth = $auth;
80 $auth = new auth_mock_authplain();
81 $auth->setCanDo('addUser', false);
89 $auth = $oldauth;
/dokuwiki/lib/plugins/authplain/_test/
H A Descaping.test.php20 protected $auth; variable in helper_plugin_authplain_escaping_test
24 $this->auth = new auth_plugin_authplain();
45 $this->auth->createUser("mwuser", "12345", "Mediawiki User", "me@example.com");
47 $this->assertTrue($this->auth->checkPass("mwuser", "12345"));
48 $mwuser = $this->auth->getUserData("mwuser");
55 $this->auth->createUser("colonuser", "password", $name, "me@example.com");
57 $user = $this->auth->getUserData("colonuser");
63 $this->auth->createUser("slashuser", "password", $name, "me@example.com");
65 $user = $this->auth->getUserData("slashuser");
71 $this->auth->createUser("slashuser", "password", $name, "me@example.com");
[all …]
H A Duserdata.test.php13 protected $auth; variable in userdata_test
24 $this->auth = new auth_plugin_authplain();
33 $actual = $this->auth->retrieveGroups();
43 $actual = $this->auth->retrieveGroups(0, 2);
47 $actual = $this->auth->retrieveGroups(0, 20);
57 $actual = $this->auth->retrieveGroups(3,10);
61 $actual = $this->auth->retrieveGroups(10,3);
/dokuwiki/lib/plugins/usermanager/
H A Dremote.php43 global $auth;
45 if (!$auth->canDo('addUser')) {
47 sprintf('Authentication backend %s can\'t do addUser', $auth->getPluginName()),
52 $user = trim($auth->cleanUser($user));
72 $ok = (bool)$auth->triggerUserMod('create', [$user, $password, $name, $mail, $groups]);
98 global $auth;
99 if (!$auth->canDo('delUser')) {
101 sprintf('Authentication backend %s can\'t do delUser', $auth->getPluginName()),
107 global $auth;
108 return (bool)$auth->triggerUserMod('delete', [[$user]]);
H A Dcli.php60 global $auth;
62 if (!$auth instanceof AuthPlugin) {
99 global $auth;
101 if (!$auth->canDo('getUsers')) {
119 global $auth;
120 $list = $auth->retrieveUsers();
148 global $auth;
150 if (!$auth->canDo('addUser')) {
158 if ($auth->canDo('modPass')) {
174 if ($auth->triggerUserMod('create', [$login, $pass, $name, $mail, $grps])) {
[all …]
H A Dadmin.php28 protected $auth; // auth object variable in admin_plugin_usermanager
46 global $auth;
50 if (!$auth instanceof AuthPlugin) {
52 } elseif (!$auth->canDo('getUsers')) {
56 $this->auth = &$auth;
74 if (!is_null($this->auth))
122 if (is_null($this->auth)) return false;
169 …$this->users_total = $this->auth->canDo('getUserCount') ? $this->auth->getUserCount($this->filter)…
200 if (is_null($this->auth)) {
205 $user_list = $this->auth->retrieveUsers($this->start, $this->pagesize, $this->filter);
[all …]
/dokuwiki/lib/plugins/authad/
H A Daction.php39 global $auth;
40 if (!is_a($auth, 'auth_plugin_authad')) return; // AD not even used
43 $usr = $auth->cleanUser($event->data['user']);
44 $dom = $auth->getUserDomain($usr);
63 global $auth;
64 if (!is_a($auth, 'auth_plugin_authad')) return; // AD not even used
65 $domains = $auth->getConfiguredDomains();
77 $usr = $auth->cleanUser($INPUT->str('u'));
78 $dom = $auth->getUserDomain($usr);
82 $usr = $auth->getUserName($usr);
/dokuwiki/_test/tests/inc/
H A Dauth_deleteprofile.test.php20 global $ACT, $INPUT, $conf, $auth;
37 $auth = new AuthDeletePlugin();
40 $this->assertTrue($auth->loggedOff);
45 global $ACT, $INPUT, $conf, $auth;
63 $auth = new AuthDeletePlugin();
76 global $ACT, $INPUT, $conf, $auth;
93 $auth = new AuthDeletePlugin(false);
100 global $ACT, $INPUT, $conf, $auth;
117 $auth = new AuthDeletePlugin();
121 $this->assertTrue($auth->canDo('delUser'));
[all …]
H A Dauth_admincheck.test.php14 global $auth;
15 $this->oldauth = $auth;
20 global $auth;
21 $auth = new AuthPlugin();
26 global $auth;
27 $auth = new AuthCaseInsensitivePlugin();
36 global $auth;
37 $auth = new \auth_plugin_authplain();
46 global $auth;
47 $auth = new \auth_plugin_authplain();
[all …]
H A Dauth_aclcheck_caseinsensitive.test.php11 global $auth;
14 $this->oldAuth = $auth;
17 $auth = new AuthCaseInsensitivePlugin();
23 global $auth;
25 $auth = $this->oldAuth;
/dokuwiki/inc/
H A Dauth.php41 global $auth;
60 $auth = $plugin_controller->load('auth', $plugin);
65 if (!$auth instanceof AuthPlugin) {
70 if ($auth->success == false) {
72 $auth = null;
98 if (true === $auth->success) {
99 $INPUT->set('u', $auth->cleanUser(stripctl($INPUT->str('u'))));
106 if ($auth->canDo('external')) {
107 $ok = $auth->trustExternal($INPUT->str('u'), $INPUT->str('p'), $INPUT->bool('r'));
190 global $auth;
[all …]
H A Dmedia.php64 * @param int $auth permission level
68 function media_metasave($id, $auth, $data) argument
70 if ($auth < AUTH_UPLOAD) return false;
149 * @param int $auth permission level
152 function media_metaform($id, $auth) argument
156 if ($auth < AUTH_UPLOAD) {
251 * @param int $auth no longer used
258 function media_delete($id, $auth) argument
261 $auth = auth_quickaclcheck(ltrim(getNS($id) . ':*', ':'));
262 if ($auth < AUTH_DELETE) return DOKU_MEDIA_NOT_AUTH;
[all …]
H A Dconfutils.php366 global $auth;
372 (isset($conf['openregister']) && !$conf['openregister']) || !$auth instanceof AuthPlugin
373 || !$auth->canDo('addUser')
378 (isset($conf['resendpasswd']) && !$conf['resendpasswd']) || !$auth instanceof AuthPlugin
379 || !$auth->canDo('modPass')
383 … if ((isset($conf['subscribers']) && !$conf['subscribers']) || !$auth instanceof AuthPlugin) {
386 if (!$auth instanceof AuthPlugin || !$auth->canDo('Profile')) {
389 if (!$auth instanceof AuthPlugin || !$auth->canDo('delUser')) {
392 if (!$auth instanceof AuthPlugin) {
395 if (!$auth instanceof AuthPlugin || !$auth->canDo('logout')) {
/dokuwiki/inc/Action/
H A DResendpwd.php32 global $auth;
36 if (!$auth->canDo('modPass')) throw new ActionDisabledException();
72 global $auth;
100 $userinfo = $auth->getUserData($user, $requireGroups = false);
117 if (!$auth->triggerUserMod('modify', [$user, ['pass' => $pass]])) {
123 if (!$auth->triggerUserMod('modify', [$user, ['pass' => $pass]])) {
146 $user = trim($auth->cleanUser($INPUT->post->str('login')));
149 $userinfo = $auth->getUserData($user, $requireGroups = false);
H A DAbstractAclAction.php22 global $auth;
24 if (!$auth instanceof AuthPlugin) throw new ActionAclRequiredException();
H A DProfileDelete.php30 global $auth;
31 if (!$auth->canDo('delUser')) throw new ActionDisabledException();
H A DProfile.php32 global $auth;
33 if (!$auth->canDo('Profile')) throw new ActionDisabledException();
H A DRegister.php32 global $auth;
35 if (!$auth->canDo('addUser')) throw new ActionDisabledException();
H A DLogout.php30 global $auth;
31 if (!$auth->canDo('logout')) throw new ActionDisabledException();
/dokuwiki/_test/tests/Remote/
H A DApiCoreAclCheckTest.php20 global $auth;
23 $auth = new \auth_plugin_authplain();
67 global $auth;
82 $auth->createUser("user1", "54321", "a User", "you@example.com");
83 $auth->createUser("user2", "543210", "You", "he@example.com");
84 …$auth->createUser("mwuser", "12345", "Wiki User", "me@example.com", ['more']); //not in default gr…
/dokuwiki/inc/Ui/
H A DUserProfile.php26 global $auth;
42 if ($auth->canDo('delUser') && actionOK('profile_delete')) {
78 global $auth;
95 if (!$auth->canDo('modName')) $attr['disabled'] = 'disabled';
104 if (!$auth->canDo('modMail')) $attr['disabled'] = 'disabled';
112 if ($auth->canDo('modPass')) {
/dokuwiki/inc/Feed/
H A DFeedItemProcessor.php111 global $auth;
121 if ($conf['useacl'] && $auth instanceof AuthPlugin) {
122 $userInfo = $auth->getUserData($user);

123