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
139
Merge Requests
139
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
ef20fc9b
Commit
ef20fc9b
authored
Dec 28, 2023
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Products.ERP5Security.ERP5GroupManager: Add deprecation warnings
parent
354c857e
Pipeline
#34065
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide 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 @
ef20fc9b
...
...
@@ -18,6 +18,7 @@
from
collections
import
defaultdict
from
contextlib
import
contextmanager
from
threading
import
local
import
warnings
from
Products.ERP5Type.Globals
import
InitializeClass
from
AccessControl
import
ClassSecurityInfo
from
Products.PageTemplates.PageTemplateFile
import
PageTemplateFile
...
...
@@ -119,6 +120,12 @@ class ERP5GroupManager(BasePlugin):
return
()
category_mapping
=
self
.
getPortalSecurityCategoryMapping
()
if
category_mapping
:
# BBB
warnings
.
warn
(
'Consider migrating ERP5Type_getSecurityCategoryMapping to '
'ERP5User_getUserSecurityCategoryValueList to get better '
'performance'
,
DeprecationWarning
,
)
has_relative_urls
=
True
security_category_dict
=
defaultdict
(
list
)
for
method_name
,
base_category_list
in
category_mapping
:
...
...
@@ -207,6 +214,13 @@ class ERP5GroupManager(BasePlugin):
),
)
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
:
# Convert security_category_value_dict_list to security_category_dict
# 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