Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Titouan Soulard
slapos.core
Commits
241c3ee1
Commit
241c3ee1
authored
Nov 07, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test up to Image.
parent
3fc6cca9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
6 deletions
+44
-6
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSGroupRoleSecurity.py
...apos_erp5/TestTemplateItem/testSlapOSGroupRoleSecurity.py
+43
-5
master/bt5/slapos_erp5/bt/revision
master/bt5/slapos_erp5/bt/revision
+1
-1
No files found.
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSGroupRoleSecurity.py
View file @
241c3ee1
...
@@ -306,16 +306,54 @@ class TestFile(TestSlapOSGroupRoleSecurityMixin):
...
@@ -306,16 +306,54 @@ class TestFile(TestSlapOSGroupRoleSecurityMixin):
test_GroupCompany
=
test_SecurityForShacache
test_GroupCompany
=
test_SecurityForShacache
class
TestHostingSubscription
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestHostingSubscription
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
def
test_RelatedSoftwareInstanceGroup
(
self
):
raise
NotImplementedError
reference
=
'TESTHS-%s'
%
self
.
generateNewId
()
subscription
=
self
.
portal
.
hosting_subscription_module
.
newContent
(
portal_type
=
'Hosting Subscription'
,
reference
=
reference
)
subscription
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
subscription
,
[
self
.
user_id
,
reference
],
False
)
self
.
assertRoles
(
subscription
,
reference
,
[
'Assignor'
])
def
test_CustomOfTheHostingSubscription
(
self
):
customer_reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
customer
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
customer_reference
)
reference
=
'TESTHS-%s'
%
self
.
generateNewId
()
subscription
=
self
.
portal
.
hosting_subscription_module
.
newContent
(
portal_type
=
'Hosting Subscription'
,
reference
=
reference
,
destination_section
=
customer
.
getRelativeUrl
())
subscription
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
subscription
,
[
self
.
user_id
,
reference
,
customer_reference
],
False
)
self
.
assertRoles
(
subscription
,
reference
,
[
'Assignor'
])
self
.
assertRoles
(
subscription
,
customer_reference
,
[
'Assignee'
])
class
TestHostingSubscriptionModule
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestHostingSubscriptionModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
def
test
(
self
):
raise
NotImplementedError
module
=
self
.
portal
.
hosting_subscription_module
self
.
assertSecurityGroup
(
module
,
[
'R-COMPUTER'
,
'R-MEMBER'
,
'R-INSTANCE'
,
'zope'
],
False
)
self
.
assertRoles
(
module
,
'R-MEMBER'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'R-COMPUTER'
,
[
'Auditor'
])
self
.
assertRoles
(
module
,
'R-INSTANCE'
,
[
'Auditor'
])
self
.
assertRoles
(
module
,
'zope'
,
[
'Owner'
])
class
TestImage
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestImage
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
def
test_SecurityForShacache
(
self
):
raise
NotImplementedError
image
=
self
.
portal
.
image_module
.
newContent
(
portal_type
=
'Image'
)
image
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
image
,
[
'G-COMPANY'
,
self
.
user_id
,
'R-COMPUTER'
,
'R-INSTANCE'
,
'R-MEMBER'
],
False
)
self
.
assertRoles
(
image
,
'R-COMPUTER'
,
[
'Auditor'
])
self
.
assertRoles
(
image
,
'R-INSTANCE'
,
[
'Auditor'
])
self
.
assertRoles
(
image
,
'R-MEMBER'
,
[
'Auditor'
])
self
.
assertRoles
(
image
,
'G-COMPANY'
,
[
'Assignor'
])
test_GroupCompany
=
test_SecurityForShacache
class
TestImageModule
(
TestSlapOSGroupRoleSecurityMixin
):
class
TestImageModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
def
test
(
self
):
...
...
master/bt5/slapos_erp5/bt/revision
View file @
241c3ee1
49
50
\ No newline at end of file
\ No newline at end of file
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