Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
c032efac
Commit
c032efac
authored
Oct 12, 2017
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all: Avoid remaining direct calls to {recursiveI,i}mmediateReindexObject
Also, simplify scripts while doing so.
parent
59e7ed29
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
31 deletions
+17
-31
bt5/erp5_configurator_run_my_doc/SkinTemplateItem/portal_skins/erp5_configurator_run_my_doc/BusinessConfiguration_reindexRunMyDocObjectsAndRoles.py
...c/BusinessConfiguration_reindexRunMyDocObjectsAndRoles.py
+15
-17
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_createWebSiteAccount.py
...tem/portal_skins/erp5_web/WebSite_createWebSiteAccount.py
+1
-6
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/Foo_createHasUnauthorizedFoo.py
...erp5_web_renderjs_ui_test/Foo_createHasUnauthorizedFoo.py
+1
-8
No files found.
bt5/erp5_configurator_run_my_doc/SkinTemplateItem/portal_skins/erp5_configurator_run_my_doc/BusinessConfiguration_reindexRunMyDocObjectsAndRoles.py
View file @
c032efac
""" This script reindex all the objects created before updating local roles """
module_list
=
[
'document_module'
,
'image_module'
,
'knowledge_pad_module'
,
'organisation_module'
,
'person_module'
,
'review_module'
,
'test_page_module'
,
'web_page_module'
,
'web_site_module'
]
context
.
portal_types
.
Folder_reindexAll
()
portal
=
context
.
getPortalObject
()
for
module_id
in
module_list
:
stack
=
[
getattr
(
portal
,
module_id
)]
for
obj
in
stack
:
for
child
in
obj
.
objectValues
():
stack
.
append
(
child
)
portal
.
portal_types
.
Folder_reindexAll
()
stack
=
[
portal
.
document_module
,
portal
.
image_module
,
portal
.
knowledge_pad_module
,
portal
.
organisation_module
,
portal
.
person_module
,
portal
.
review_module
,
portal
.
test_page_module
,
portal
.
web_page_module
,
portal
.
web_site_module
,
]
for
obj
in
stack
:
stack
.
extend
(
obj
.
objectValues
())
obj
.
updateLocalRolesOnSecurityGroups
()
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_createWebSiteAccount.py
View file @
c032efac
...
...
@@ -46,13 +46,8 @@ if person_list:
# create Person account
person_module
=
portal
.
getDefaultModule
(
portal_type
=
'Person'
)
person
=
person_module
.
newContent
(
portal_type
=
'Person'
,
**
kw
)
person
=
person_module
.
newContent
(
reindex_on_commit
=
True
,
portal_type
=
'Person'
,
**
kw
)
person
.
validate
()
# do not immediate reindex object
# this means that when creating an account the new one will *NOT*
# be available immediately and we should consider sending two email to user
# that 1) his account will be created and when created 2)-> send account info
#person.immediateReindexObject()
# Create default career
person
.
newContent
(
portal_type
=
'Career'
,
...
...
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/Foo_createHasUnauthorizedFoo.py
View file @
c032efac
...
...
@@ -2,12 +2,5 @@ foo1 = context.foo_module.newContent(portal_type='Foo')
foo2
=
context
.
foo_module
.
newContent
(
portal_type
=
'Foo'
)
foo1
.
setTitle
(
'hasAccessUnauthorized'
)
foo1
.
setSuccessorValue
(
foo2
)
foo1
.
immediateReindexObject
()
foo2
.
immediateReindexObject
()
foo2
.
activate
().
manage_permission
(
'Access contents information'
,
'Manager'
,
0
)
foo2
.
activate
().
manage_permission
(
'Access contents information'
,
'Manager'
,
0
)
return
'Done'
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