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
Guillaume Hervier
slapos.core
Commits
815cf15a
Commit
815cf15a
authored
Nov 07, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test up to File.
parent
b0952bc9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
9 deletions
+51
-9
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSGroupRoleSecurity.py
...apos_erp5/TestTemplateItem/testSlapOSGroupRoleSecurity.py
+50
-8
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 @
815cf15a
...
...
@@ -244,24 +244,66 @@ class TestCredentialUpdateModule(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
module
,
'zope'
,
[
'Owner'
])
class
TestDataSet
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
raise
NotImplementedError
def
test_AnyFromShadirGroup
(
self
):
data_set
=
self
.
portal
.
data_set_module
.
newContent
(
portal_type
=
'Data Set'
)
data_set
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
data_set
,
[
self
.
user_id
,
'R-COMPUTER'
,
'R-INSTANCE'
,
'R-MEMBER'
],
False
)
self
.
assertRoles
(
data_set
,
'R-COMPUTER'
,
[
'Auditor'
])
self
.
assertRoles
(
data_set
,
'R-INSTANCE'
,
[
'Auditor'
])
self
.
assertRoles
(
data_set
,
'R-MEMBER'
,
[
'Auditor'
])
class
TestDataSetModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
raise
NotImplementedError
module
=
self
.
portal
.
data_set_module
self
.
assertSecurityGroup
(
module
,
[
'R-COMPUTER'
,
'R-INSTANCE'
,
'R-MEMBER'
,
'zope'
],
False
)
self
.
assertRoles
(
module
,
'R-COMPUTER'
,
[
'Author'
])
self
.
assertRoles
(
module
,
'R-INSTANCE'
,
[
'Author'
])
self
.
assertRoles
(
module
,
'R-MEMBER'
,
[
'Author'
])
self
.
assertRoles
(
module
,
'zope'
,
[
'Owner'
])
class
TestDocumentModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
raise
NotImplementedError
module
=
self
.
portal
.
document_module
self
.
assertSecurityGroup
(
module
,
[
'R-COMPUTER'
,
'R-INSTANCE'
,
'R-MEMBER'
,
'zope'
,
'G-COMPANY'
],
False
)
self
.
assertRoles
(
module
,
'R-COMPUTER'
,
[
'Author'
])
self
.
assertRoles
(
module
,
'R-INSTANCE'
,
[
'Author'
])
self
.
assertRoles
(
module
,
'R-MEMBER'
,
[
'Author'
])
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Author'
,
'Auditor'
])
self
.
assertRoles
(
module
,
'zope'
,
[
'Owner'
])
class
TestDrawing
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
raise
NotImplementedError
def
test_SecurityForShacache
(
self
):
drawing
=
self
.
portal
.
document_module
.
newContent
(
portal_type
=
'Drawing'
)
drawing
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
drawing
,
[
'G-COMPANY'
,
self
.
user_id
,
'R-COMPUTER'
,
'R-INSTANCE'
,
'R-MEMBER'
],
False
)
self
.
assertRoles
(
drawing
,
'R-COMPUTER'
,
[
'Auditor'
])
self
.
assertRoles
(
drawing
,
'R-INSTANCE'
,
[
'Auditor'
])
self
.
assertRoles
(
drawing
,
'R-MEMBER'
,
[
'Auditor'
])
self
.
assertRoles
(
drawing
,
'G-COMPANY'
,
[
'Assignor'
])
test_GroupCompany
=
test_SecurityForShacache
class
TestFile
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
raise
NotImplementedError
def
test_SecurityForShacache
(
self
):
file_
=
self
.
portal
.
document_module
.
newContent
(
portal_type
=
'File'
)
file_
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
file_
,
[
'G-COMPANY'
,
self
.
user_id
,
'R-COMPUTER'
,
'R-INSTANCE'
,
'R-MEMBER'
],
False
)
self
.
assertRoles
(
file_
,
'R-COMPUTER'
,
[
'Auditor'
])
self
.
assertRoles
(
file_
,
'R-INSTANCE'
,
[
'Auditor'
])
self
.
assertRoles
(
file_
,
'R-MEMBER'
,
[
'Auditor'
])
self
.
assertRoles
(
file_
,
'G-COMPANY'
,
[
'Assignor'
])
test_GroupCompany
=
test_SecurityForShacache
class
TestHostingSubscription
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
...
...
master/bt5/slapos_erp5/bt/revision
View file @
815cf15a
47
\ No newline at end of file
48
\ 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