Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Members / jhb / research notes / plone: can't edit admin user in personalize_form if remember is installed

plone: can't edit admin user in personalize_form if remember is installed

by Jörg Baach last modified Jan 31, 2012 02:19 PM
As soon as remember is installed I can't edit the admin user settings in personalize_form anymore. Why is this?

I wrote an email on this problem:

http://www.coactivate.org/projects/remember/lists/remember/archive/2010/05/1274516060487/forum_view

Now I think, I have an idea.

  1. personalize_form calls Products/PlonePAS/tools/memberdata.py(243)canWriteProperty()
  2. which leads to Products.PlonePAS-3.12-py2.4.egg/Products/PlonePAS/tools/memberdata.py(226)_memberdataHasProperty()
  3. which does 'if mdata'
  4. bool(mdata) results in 'False'
  5. Stepping into it lands us in Products/BTreeFolder2/BTreeFolder2.py(511)__getattr__(), with name being '__nonzero__'. What kind of name is that?
  6. http://docs.python.org/release/2.4/ref/customization.html informs us that bool tries to call  __nonzero__(), then __len__() and after that assumes True
  7. So, because remembers portal_memberdata is a BTree, which has __len__, but is empty by default, this doesn't work.
  8. Let Products.remember.tools.memberdata.MemberDataContainer have a __nonzero__.
  9. Works like a charm!
  10. But is this the right place - shoudn't rather Products/PlonePAS/tools/memberdata.py(226)_memberdataHasProperty() do a 'if mdata != None'?
Add comment

You can add a comment by filling out the form below. Plain text formatting.

Question: What is 42 minus 19?
Your answer: