Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
erp5
Commits
c1a80e87
Commit
c1a80e87
authored
Oct 01, 2012
by
Jean-Paul Smets
Committed by
Julien Muchembled
Oct 01, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add TODO about naming conventions of decorators and 'unrestricted_apply'
parent
391ea84e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
product/ERP5Type/UnrestrictedMethod.py
product/ERP5Type/UnrestrictedMethod.py
+1
-1
product/ERP5Type/Utils.py
product/ERP5Type/Utils.py
+1
-0
No files found.
product/ERP5Type/UnrestrictedMethod.py
View file @
c1a80e87
...
@@ -67,7 +67,7 @@ def UnrestrictedMethod(function):
...
@@ -67,7 +67,7 @@ def UnrestrictedMethod(function):
"""
"""
return
lambda
*
args
,
**
kw
:
unrestricted_apply
(
function
,
args
,
kw
)
return
lambda
*
args
,
**
kw
:
unrestricted_apply
(
function
,
args
,
kw
)
def
unrestricted_apply
(
function
,
args
=
(),
kw
=
{}):
def
unrestricted_apply
(
function
,
args
=
(),
kw
=
{}):
# XXX-JPS: naming
"""Function to bypass all security checks
"""Function to bypass all security checks
This function is as dangerous as 'UnrestrictedMethod' decorator. Read its
This function is as dangerous as 'UnrestrictedMethod' decorator. Read its
...
...
product/ERP5Type/Utils.py
View file @
c1a80e87
...
@@ -66,6 +66,7 @@ try:
...
@@ -66,6 +66,7 @@ try:
except
ImportError
:
except
ImportError
:
magic
=
None
magic
=
None
# XXX-JPS: We need naming conventions and central list of decorators.
def
simple_decorator
(
decorator
):
def
simple_decorator
(
decorator
):
"""Decorator to turn simple function into well-behaved decorator
"""Decorator to turn simple function into well-behaved decorator
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment