confusion due to acquired allowed types
Wichert Akkerman <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.archetypes.devel |
|---|---|
| Message-ID | <[email protected]> |
We just had an interesting debugging session in a site where no addable types were listed in a folder, even though he was allowed to add all types. This is the setup we had: - a folder parent in which the user could not add anything - a folder parent/child in which the user could add everything (via a local role) - folder parent/child had constraint types mode set to acquired what happens is that when building the list of addable types in parent/child getLocallyAllowedTypes looks at the list of allowed types in the parent folder. That folder allows all types, but our user is not allowed to add anything so this returns an empty list. I'm not very familiar with that code, but it seems fixable by refactoring it a bit so isConstructionAllowed for the fti is only called in the folder where we want to add something instead of for the folder where we are getting the type list from. Is that a reasonable change to make? Wichert. -- Wichert Akkerman <[email protected]> It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642