Skip to content. | Skip to navigation

Personal tools


You are here: Home / Steve's Blog / User Property Frolics on the Sound

User Property Frolics on the Sound

Posted by Steve McMahon at Mar 20, 2014 11:55 PM |
Filed under:

Much is possible, with a little help from your friends -- and a few sprint sponsors.

The recent Emerald Sprint concentrated on user issues: how those pesky people who don't work at the command prompt register, login, logout and fill out their user profiles. With Ian Anderson and Luke Brannon, I worked on PLIP 13350, a proposal to make the fields that make up a user profile easy to extend and edit.


Changing user profile fields is one of those long-term Plone annoyances. It's something that's very easy to do -- for an experienced integrator -- but completely opaque to new integrators and developers. Eric Brehault (ebrehault) and Mathieu Le Marec - Pasquet (kiorky) submitted a plan to clean this up with PLIP 13350 using something like the Dexterity field editor. They also laid the implementation groundwork, actually using Dexterity's schema and schema editor.

Ian, Luke and I took on getting this ready for Plone 5. We also wanted to reconcile Eric and Mathieu's work with the one of the big ideas of the Emerald Sprint: that user profile fields be distributed through registration, mandatory profile updating and profile editing.

Luke and I scored big by getting to work with Ian. Re-purposing Dexterity's schema editor to work outside of Dexterity's content type configlet is a mind-bending bit of manipulation of z3c.form, plone.schemaeditor, plone.supermodel and David Glick also added in another ingredient: new implementations of Email and URI zope schema fields in plone.schema. All this is the sort of thing I can usually figure out in a week or two, but this was a three-day sprint. Ian, though, got the hard part figured out pretty quickly, and Luke and I were able to follow him around writing tests and cleaning up details.

We didn't finish, but by sprint's end it was pretty much working. Ian had even consolidated all the fields into a single schema with field-specific flags to indicate which forms the belonged on. David jumped in from across the table to add a "these fields may not be deleted" list to the schemaeditor, and Ian was able to use it to protect fullname and email address fields -- the ones we need for Plone basics and can't allow a site admin to delete.

All of this was the kind of work that is hard to do in isolation, but can move at lightning speed at a sprint -- where you can call on a lot of community resources. So, we all owe a big thanks to the Seattle Plone Users' Group, our organizers, and all the sprint sponsors, particularly including the Plone Foundation and Chris Calloway.