Skip to content

Commit

Permalink
Removed security declaration for nonexistent method ZPythonScriptHTML…
Browse files Browse the repository at this point in the history
…_changePrefs.

Warnings on startup:

```
Class Products.CMFFormController.ControllerPythonScript.ControllerPythonScript has a security declaration for nonexistent method 'ZPythonScriptHTML_changePrefs'
Class Products.CMFFormController.ControllerValidator.ControllerValidator has a security declaration for nonexistent method 'ZPythonScriptHTML_changePrefs'
```

This method was removed from `Products.PythonScripts` in version 4.2, from October 2018.
Added `Products.PythonScripts>=4.2` as dependency.
  • Loading branch information
mauritsvanrees committed Sep 2, 2020
1 parent 73dbde3 commit 24f5fe4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Products/CMFFormController/ControllerPythonScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class ControllerPythonScript(BaseClass, ControllerBase):
security.declareProtected('Change Python Scripts',
'ZPythonScriptHTML_editAction',
'ZPythonScript_setTitle', 'ZPythonScript_edit',
'ZPythonScriptHTML_upload', 'ZPythonScriptHTML_changePrefs')
'ZPythonScriptHTML_upload')


def __init__(self, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion Products/CMFFormController/ControllerValidator.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class ControllerValidator(BaseClass, ControllerBase):
security.declareProtected('Change Python Scripts',
'ZPythonScriptHTML_editAction',
'ZPythonScript_setTitle', 'ZPythonScript_edit',
'ZPythonScriptHTML_upload', 'ZPythonScriptHTML_changePrefs')
'ZPythonScriptHTML_upload')


def __init__(self, *args, **kwargs):
Expand Down
4 changes: 4 additions & 0 deletions news/3130.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Removed security declaration for nonexistent method ``ZPythonScriptHTML_changePrefs``.
This method was removed from ``Products.PythonScripts`` in version 4.2, from October 2018.
Added ``Products.PythonScripts>=4.2`` as dependency.
[maurits]
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@
'Acquisition',
'transaction',
'Zope2>=4.0.a2',
'Products.PythonScripts>=4.2',
],
)

0 comments on commit 24f5fe4

Please sign in to comment.