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
fd5818e7
Commit
fd5818e7
authored
Jul 13, 2018
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testERP5Catalog: Roles are granted to user ids, not Person references.
parent
41e70249
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
product/ERP5Catalog/tests/testERP5Catalog.py
product/ERP5Catalog/tests/testERP5Catalog.py
+5
-6
No files found.
product/ERP5Catalog/tests/testERP5Catalog.py
View file @
fd5818e7
...
...
@@ -2836,8 +2836,6 @@ VALUES
This is a case when Person document containting reference with local role
which shall be monovalued is reindexed for first time.
"""
user
=
'person_document_user_name'
sql_connection
=
self
.
getSQLConnection
()
def
query
(
sql
):
result
=
sql_connection
.
manage_test
(
sql
)
...
...
@@ -2931,9 +2929,10 @@ VALUES
self
.
portal
.
portal_caches
.
clearAllCache
()
self
.
commit
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
user
)
person
.
manage_setLocalRoles
(
user
,
[
'Assignee'
])
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
)
user_id
=
person
.
Person_getUserId
()
person
.
manage_setLocalRoles
(
user_id
,
[
'Assignee'
])
self
.
tic
()
roles_and_users_result
=
query
(
'select * from roles_and_users where uid = (select security_uid from catalog where uid = %s)'
%
person
.
getUid
())
...
...
@@ -2945,7 +2944,7 @@ VALUES
[
'Assignee'
,
'Assignor'
,
'Associate'
,
'Auditor'
,
'Author'
,
'Manager'
]
)
# check that user has optimised security declaration
self
.
assertEqual
(
local_roles_table_result
[
'viewable_assignee_reference'
],
user
)
self
.
assertEqual
(
local_roles_table_result
[
'viewable_assignee_reference'
],
user
_id
)
finally
:
sql_catalog
.
sql_catalog_object_list
=
\
current_sql_catalog_object_list
...
...
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