[Zope-CMF] Dealing with reserved IDs, due to portal_skins

Dieter Maurer dieter@handshake.de
Tue, 1 Apr 2003 21:25:02 +0200


Ausum Studio wrote at 2003-3-31 12:36 -0500:
 > The standard id checking in CMF prevents a non-manager to create any object
 > with an id similar to what is already in the acquisition path. This would
 > seem fine at a first glance, but actually it reduces the chances of
 > end-users to choose intuitive, easy-to-remember ids for their own stuff.
 > 
 > For example, logged as a regular member, I can't create a folder and name it
 > "Images" because there's already one named like that within portal_skins.
 > While as a manager I can rename the one in portal_skins to another rare id,
 > that doesn't prevent the user to eventually fall into this same problem
 > again, with another object's name.
 > 
 > Has anyone dealed with this before? What were your strategies? Does it make
 > sense to modify the portal_skins id look-up routine, so that we can reduce
 > the number of overall reserved ids to its minimum?

That's a difficult problem.

I fear, the only work around is to use ids in your skins with
a very low conflict probability.

You cannot simply change the lookup routine as many skin objects
rely on the fact to get the original skin object and not the
user object.

A naming scheme might help: e.g. append "_" to any skin object id.
But, of course, URL get uglier by such a convention.


Dieter