zopefoundation / Products.PluggableAuthService

Pluggable Zope authentication / authorization framework
Other
9 stars 18 forks source link

Can not assign role to user #56

Closed krissik closed 4 years ago

krissik commented 4 years ago

I hope here is the correct place for this.

If I try to assign a role to a user using portal_role_manager I get an error.

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 155, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 337, in publish_module
  Module ZPublisher.WSGIPublisher, line 255, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 61, in call_object
  Module Products.PluggableAuthService.utils, line 4, in wrapper
  Module <string>, line 4, in manage_assignRoleToPrincipals
  Module AccessControl.requestmethod, line 88, in _curried
  Module Products.PluggableAuthService.plugins.ZODBRoleManager, line 421, in manage_assignRoleToPrincipals
  Module Products.PlonePAS.plugins.role, line 69, in assignRoleToPrincipal
  Module Products.PluggableAuthService.plugins.ZODBRoleManager, line 303, in assignRoleToPrincipal
TypeError: '<' not supported between instances of 'str' and 'list'

It is on my two plone 5.2.0 portals and on demo.plone.org so I don`t think that I have configured something wrong.

Maybe something went wrong after searching for a user to assign the role to. After that the role name is doubled in headline. Before:

Assign Role: Reviewer (Properties)

After:

Assign Role: ['Reviewer', 'Reviewer'] (Properties)
dataflake commented 4 years ago

Duplicate of #43 and #51 . Fix was released with version 2.1.