Commit c4ac239a authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Kazuhiko Shiozaki

Make Id Generator security declarations consistent.

parent 3fbddb7f
...@@ -157,7 +157,7 @@ class SQLNonContinuousIncreasingIdGenerator(IdGenerator): ...@@ -157,7 +157,7 @@ class SQLNonContinuousIncreasingIdGenerator(IdGenerator):
default=default) default=default)
return range(new_id - id_count, new_id) return range(new_id - id_count, new_id)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.ModifyPortalContent,
'initializeGenerator') 'initializeGenerator')
def initializeGenerator(self): def initializeGenerator(self):
""" """
...@@ -206,7 +206,7 @@ class SQLNonContinuousIncreasingIdGenerator(IdGenerator): ...@@ -206,7 +206,7 @@ class SQLNonContinuousIncreasingIdGenerator(IdGenerator):
if storage: if storage:
self._updateSqlTable() self._updateSqlTable()
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.ModifyPortalContent,
'clearGenerator') 'clearGenerator')
def clearGenerator(self): def clearGenerator(self):
""" """
......
...@@ -87,7 +87,7 @@ class ZODBContinuousIncreasingIdGenerator(IdGenerator): ...@@ -87,7 +87,7 @@ class ZODBContinuousIncreasingIdGenerator(IdGenerator):
default=default) default=default)
return range(new_id - id_count, new_id) return range(new_id - id_count, new_id)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.ModifyPortalContent,
'initializeGenerator') 'initializeGenerator')
def initializeGenerator(self): def initializeGenerator(self):
""" """
...@@ -111,7 +111,7 @@ class ZODBContinuousIncreasingIdGenerator(IdGenerator): ...@@ -111,7 +111,7 @@ class ZODBContinuousIncreasingIdGenerator(IdGenerator):
continue continue
self.last_id_dict[id_group] = last_id self.last_id_dict[id_group] = last_id
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.ModifyPortalContent,
'clearGenerator') 'clearGenerator')
def clearGenerator(self): def clearGenerator(self):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment