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
Léo-Paul Géneau
erp5
Commits
c4ac239a
Commit
c4ac239a
authored
10 years ago
by
Vincent Pelletier
Committed by
Kazuhiko Shiozaki
9 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Id Generator security declarations consistent.
parent
3fbddb7f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
product/ERP5/Document/SQLNonContinuousIncreasingIdGenerator.py
...ct/ERP5/Document/SQLNonContinuousIncreasingIdGenerator.py
+2
-2
product/ERP5/Document/ZODBContinuousIncreasingIdGenerator.py
product/ERP5/Document/ZODBContinuousIncreasingIdGenerator.py
+2
-2
No files found.
product/ERP5/Document/SQLNonContinuousIncreasingIdGenerator.py
View file @
c4ac239a
...
...
@@ -157,7 +157,7 @@ class SQLNonContinuousIncreasingIdGenerator(IdGenerator):
default
=
default
)
return
range
(
new_id
-
id_count
,
new_id
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'initializeGenerator'
)
def
initializeGenerator
(
self
):
"""
...
...
@@ -206,7 +206,7 @@ class SQLNonContinuousIncreasingIdGenerator(IdGenerator):
if
storage
:
self
.
_updateSqlTable
()
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'clearGenerator'
)
def
clearGenerator
(
self
):
"""
...
...
This diff is collapsed.
Click to expand it.
product/ERP5/Document/ZODBContinuousIncreasingIdGenerator.py
View file @
c4ac239a
...
...
@@ -87,7 +87,7 @@ class ZODBContinuousIncreasingIdGenerator(IdGenerator):
default
=
default
)
return
range
(
new_id
-
id_count
,
new_id
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'initializeGenerator'
)
def
initializeGenerator
(
self
):
"""
...
...
@@ -111,7 +111,7 @@ class ZODBContinuousIncreasingIdGenerator(IdGenerator):
continue
self
.
last_id_dict
[
id_group
]
=
last_id
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'clearGenerator'
)
def
clearGenerator
(
self
):
"""
...
...
This diff is collapsed.
Click to expand it.
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