Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When Exclude user from allowedRolesAndUsers is set, Anonymous can't make search #13

Open
naro opened this issue Mar 20, 2012 · 1 comment

Comments

@naro
Copy link

naro commented Mar 20, 2012

If I set Exclude user from allowedRolesAndUsers in @@solr-controlpanel, anonymous search fails with:

...
  Module script, line 111, in queryCatalog
   - <FSPythonScript at /Plone/queryCatalog>
   - Line 111
  Module AccessControl.ZopeGuards, line 373, in guarded_apply
  Module AccessControl.ZopeGuards, line 395, in builtin_guarded_apply
  Module collective.indexing.monkey, line 84, in searchResults
  Module collective.solr.monkey, line 31, in searchResults
  Module collective.solr.dispatcher, line 43, in __call__
  Module collective.solr.dispatcher, line 87, in solrSearchResults
  Module collective.solr.mangler, line 136, in mangleQuery
TypeError: cannot concatenate 'str' and 'NoneType' objects

getSecurityManager().getUser() returns AnonymousUser and getSecurityManager().getUser().getId() returns None.
Line:
token = 'user$' + getSecurityManager().getUser().getId()
fails on TypeError.
value variable contains ['Anonymous'] so token should be 'Anonymous' as well.

@naro
Copy link
Author

naro commented Mar 30, 2012

I've tried to fix it in naro@91e847f but I'm not sure if this is correct behavior of exclude_user flag. Please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant