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
Cédric Le Ninivin
slapos.core
Commits
98d02378
Commit
98d02378
authored
Nov 07, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test up to Person Module.
parent
a7eb2154
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
7 deletions
+48
-7
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSGroupRoleSecurity.py
...apos_erp5/TestTemplateItem/testSlapOSGroupRoleSecurity.py
+47
-6
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 @
98d02378
...
...
@@ -398,19 +398,60 @@ class TestOrganisation(TestSlapOSGroupRoleSecurityMixin):
class
TestOrganisationModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
raise
NotImplementedError
module
=
self
.
portal
.
organisation_module
self
.
assertSecurityGroup
(
module
,
[
'G-COMPANY'
,
'R-COMPUTER'
,
'R-MEMBER'
,
'zope'
],
False
)
self
.
assertRoles
(
module
,
'R-MEMBER'
,
[
'Auditor'
])
self
.
assertRoles
(
module
,
'R-COMPUTER'
,
[
'Auditor'
])
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'zope'
,
[
'Owner'
])
class
TestPDF
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
raise
NotImplementedError
def
test_SecurityForShacache
(
self
):
pdf
=
self
.
portal
.
document_module
.
newContent
(
portal_type
=
'PDF'
)
pdf
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
pdf
,
[
'G-COMPANY'
,
self
.
user_id
,
'R-COMPUTER'
,
'R-INSTANCE'
,
'R-MEMBER'
],
False
)
self
.
assertRoles
(
pdf
,
'R-COMPUTER'
,
[
'Auditor'
])
self
.
assertRoles
(
pdf
,
'R-INSTANCE'
,
[
'Auditor'
])
self
.
assertRoles
(
pdf
,
'R-MEMBER'
,
[
'Auditor'
])
self
.
assertRoles
(
pdf
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
pdf
,
self
.
user_id
,
[
'Owner'
])
test_GroupCompany
=
test_SecurityForShacache
class
TestPerson
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
raise
NotImplementedError
def
test_GroupCompany
(
self
):
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
)
person
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
person
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
person
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
person
,
self
.
user_id
,
[
'Owner'
])
def
test_TheUserHimself
(
self
):
reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
reference
)
person
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
person
,
[
'G-COMPANY'
,
self
.
user_id
,
reference
],
False
)
self
.
assertRoles
(
person
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
person
,
reference
,
[
'Associate'
])
self
.
assertRoles
(
person
,
self
.
user_id
,
[
'Owner'
])
class
TestPersonModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
raise
NotImplementedError
module
=
self
.
portal
.
person_module
self
.
assertSecurityGroup
(
module
,
[
'G-COMPANY'
,
'R-MEMBER'
,
'zope'
],
False
)
self
.
assertRoles
(
module
,
'R-MEMBER'
,
[
'Auditor'
])
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'zope'
,
[
'Owner'
])
class
TestPresentation
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
...
...
master/bt5/slapos_erp5/bt/revision
View file @
98d02378
54
\ No newline at end of file
55
\ 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