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
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
a7a64040
Commit
a7a64040
authored
Dec 28, 2023
by
Vincent Pelletier
Committed by
Kazuhiko Shiozaki
Jul 11, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Products.ERP5Security.ERP5GroupManager: Add deprecation warnings
parent
3fc61c42
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
product/ERP5Security/ERP5GroupManager.py
product/ERP5Security/ERP5GroupManager.py
+14
-0
No files found.
product/ERP5Security/ERP5GroupManager.py
View file @
a7a64040
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
from
collections
import
defaultdict
from
collections
import
defaultdict
from
contextlib
import
contextmanager
from
contextlib
import
contextmanager
from
threading
import
local
from
threading
import
local
import
warnings
from
Products.ERP5Type.Globals
import
InitializeClass
from
Products.ERP5Type.Globals
import
InitializeClass
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
Products.PageTemplates.PageTemplateFile
import
PageTemplateFile
from
Products.PageTemplates.PageTemplateFile
import
PageTemplateFile
...
@@ -119,6 +120,12 @@ class ERP5GroupManager(BasePlugin):
...
@@ -119,6 +120,12 @@ class ERP5GroupManager(BasePlugin):
return
()
return
()
category_mapping
=
self
.
getPortalSecurityCategoryMapping
()
category_mapping
=
self
.
getPortalSecurityCategoryMapping
()
if
category_mapping
:
# BBB
if
category_mapping
:
# BBB
warnings
.
warn
(
'Consider migrating ERP5Type_getSecurityCategoryMapping to '
'ERP5User_getUserSecurityCategoryValueList to get better '
'performance'
,
DeprecationWarning
,
)
has_relative_urls
=
True
has_relative_urls
=
True
security_category_dict
=
defaultdict
(
list
)
security_category_dict
=
defaultdict
(
list
)
for
method_name
,
base_category_list
in
category_mapping
:
for
method_name
,
base_category_list
in
category_mapping
:
...
@@ -207,6 +214,13 @@ class ERP5GroupManager(BasePlugin):
...
@@ -207,6 +214,13 @@ class ERP5GroupManager(BasePlugin):
),
),
)
)
else
:
# BBB
else
:
# BBB
warnings
.
warn
(
'Consider migrating %s to %s to get better performance'
%
(
generator_name
,
ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT_V2
,
),
DeprecationWarning
,
)
if
not
has_relative_urls
:
if
not
has_relative_urls
:
# Convert security_category_value_dict_list to security_category_dict
# Convert security_category_value_dict_list to security_category_dict
# Differences with direct security_category_dict generation:
# Differences with direct security_category_dict generation:
...
...
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