Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
106
Merge Requests
106
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
9157ad21
Commit
9157ad21
authored
Aug 02, 2017
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_web: testSlapOSWebSkins, use person.getUserId instead person.getReference
parent
ae610908
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
34 deletions
+32
-34
master/bt5/slapos_web/TestTemplateItem/portal_components/test.erp5.testSlapOSWebSkins.py
...ateItem/portal_components/test.erp5.testSlapOSWebSkins.py
+32
-34
No files found.
master/bt5/slapos_web/TestTemplateItem/portal_components/test.erp5.testSlapOSWebSkins.py
View file @
9157ad21
...
...
@@ -89,8 +89,8 @@ class SlapOSWebMixin(testSlapOSMixin, SecurityTestCase):
sr
.
immediateReindexObject
()
sr
.
updateLocalRolesOnSecurityGroups
()
if
validate
:
self
.
assertUserCanAccessDocument
(
person
.
get
Reference
(),
sr
)
self
.
assertUserCanViewDocument
(
person
.
get
Reference
(),
sr
)
self
.
assertUserCanAccessDocument
(
person
.
get
UserId
(),
sr
)
self
.
assertUserCanViewDocument
(
person
.
get
UserId
(),
sr
)
return
sr
...
...
@@ -101,8 +101,8 @@ class SlapOSWebMixin(testSlapOSMixin, SecurityTestCase):
ud
.
immediateReindexObject
()
ud
.
updateLocalRolesOnSecurityGroups
()
# This seems odd, user can see draft SR even he is auditor
self
.
assertUserCanAccessDocument
(
person
.
get
Reference
(),
ud
)
self
.
assertUserCanViewDocument
(
person
.
get
Reference
(),
ud
)
self
.
assertUserCanAccessDocument
(
person
.
get
UserId
(),
ud
)
self
.
assertUserCanViewDocument
(
person
.
get
UserId
(),
ud
)
if
computer
is
not
None
:
line
=
ud
.
newContent
(
...
...
@@ -122,8 +122,8 @@ class SlapOSWebMixin(testSlapOSMixin, SecurityTestCase):
rr
.
immediateReindexObject
()
rr
.
updateLocalRolesOnSecurityGroups
()
if
validate
:
self
.
assertUserCanAccessDocument
(
person
.
get
Reference
(),
rr
)
self
.
assertUserCanViewDocument
(
person
.
get
Reference
(),
rr
)
self
.
assertUserCanAccessDocument
(
person
.
get
UserId
(),
rr
)
self
.
assertUserCanViewDocument
(
person
.
get
UserId
(),
rr
)
return
rr
...
...
@@ -198,7 +198,7 @@ class TestSlapOSWebSkin(SlapOSWebMixin):
def
afterSetUp
(
self
):
super
(
TestSlapOSWebSkin
,
self
).
afterSetUp
()
self
.
login
(
self
.
person
.
get
Reference
())
self
.
login
(
self
.
person
.
get
UserId
())
self
.
changeSkin
(
"Hosting"
)
def
test_WebSection_getUserTicketList
(
self
):
...
...
@@ -241,7 +241,7 @@ class TestSlapOSRSSSkin(SlapOSWebMixin):
def
afterSetUp
(
self
):
super
(
TestSlapOSRSSSkin
,
self
).
afterSetUp
()
self
.
login
(
self
.
person
.
get
Reference
())
self
.
login
(
self
.
person
.
get
UserId
())
self
.
changeSkin
(
"RSS"
)
def
test_WebSection_getUserTicketList
(
self
):
...
...
@@ -333,5 +333,3 @@ class TestSlapOSRSSSkin(SlapOSWebMixin):
def
test_Base_getOpenRelatedTicketList_hosting_subscription
(
self
):
""" Test Base_getOpenRelatedTicketList with Hosting Subscriptions on RSS """
self
.
_test_Base_getOpenRelatedTicketList_hosting_subscription
()
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