Skip to content

Commit

Permalink
Merge pull request #25 from collective/sneridagh_fix_enumerateusers
Browse files Browse the repository at this point in the history
Temptative to fix the bug in enumerateUsers where always is returning…
  • Loading branch information
jensens committed Apr 27, 2016
2 parents d63fa62 + 24d534e commit 5dc47a4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Changelog
1.0a8 (unreleased)
------------------

- Nothing changed yet.
- Fix filter users bug in enumerateUsers plugin where it was always returning
all the users.
[sneridagh]


1.0a7 (2016-02-15)
Expand Down
3 changes: 1 addition & 2 deletions plone-4.3.x.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[buildout]
extends =
base.cfg
http://dist.plone.org/release/4.3.7/versions.cfg
http://dist.plone.org/release/4.3.9/versions.cfg
versions.cfg

[versions]
plone.protect = 3.0.16
zest.releaser =

2 changes: 2 additions & 0 deletions src/pas/plugins/authomatic/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ def enumerateUsers(self, id=None, login=None, exact_match=False,
if search_id:
if not isinstance(search_id, basestring):
raise NotImplementedError('sequence is not supported.')
else:
return ()

pluginid = self.getId()
ret = list()
Expand Down
6 changes: 4 additions & 2 deletions src/pas/plugins/authomatic/tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ def test_user_enumaration(self):
2,
len(self.plugin.enumerateUsers(login='123wil'))
)
# list all!
# https://github.com/collective/pas.plugins.authomatic/pull/25/commits/5c0f6b1dc76a0d769e35a845ce4c4dd4307655ba
# Due to the workarround, now the enumerateUsers plugin doesn't return
# any users when searching with an empty query
self.assertEqual(
4,
0,
len(self.plugin.enumerateUsers())
)

0 comments on commit 5dc47a4

Please sign in to comment.