plone / plone.app.tiles

Plone UI integration for plone.tiles
http://pypi.python.org/pypi/plone.app.tiles
Other
6 stars 7 forks source link

ClassSecurity warnings on instance startup #29

Closed petschki closed 3 years ago

petschki commented 5 years ago

due to the class security declarations in https://github.com/plone/plone.app.tiles/blob/master/plone/app/tiles/browser/configure.zcml#L56-L61 for the interface zope.publisher.interfaces.browser.IBrowserPage you get the following warnings on startup

2019-03-25 11:23:03,638 WARNING [Init:88][MainThread] Class plone.app.tiles.browser.add.DefaultAddView has a security declaration for nonexistent method 'browserDefault'
2019-03-25 11:23:03,638 WARNING [Init:88][MainThread] Class plone.app.tiles.browser.add.DefaultAddView has a security declaration for nonexistent method 'publishTraverse'
2019-03-25 11:23:03,639 WARNING [Init:88][MainThread] Class plone.app.tiles.browser.edit.DefaultEditView has a security declaration for nonexistent method 'browserDefault'
2019-03-25 11:23:03,639 WARNING [Init:88][MainThread] Class plone.app.tiles.browser.edit.DefaultEditView has a security declaration for nonexistent method 'publishTraverse'
2019-03-25 11:23:03,639 WARNING [Init:88][MainThread] Class plone.app.tiles.browser.delete.DefaultDeleteView has a security declaration for nonexistent method 'browserDefault'
2019-03-25 11:23:03,639 WARNING [Init:88][MainThread] Class plone.app.tiles.browser.delete.DefaultDeleteView has a security declaration for nonexistent method 'publishTraverse'

I've changed the interface to zope.browser.interfaces.IBrowserView because the add/edit/delete Views are subclasses of plone.z3cform.layout.FormWrapper which itself is a subclass of BrowserView so the warnings are gone.

Question: Is this a reasonable fix, or should the views implement browserDefault and publishTraverse methods (and - if yes - how)?

petschki commented 3 years ago

Fixed that here #43 ... instead of changing the providing interface I've fixed the class inheritance of Default(Add|Edit|Delete)View class like its done in plone.dexterity