Commit 1bd7a349 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: instance has project based security group

parent c6f5025c
......@@ -162,6 +162,22 @@ class TestSlapOSSoftwareInstanceSecurity(TestSlapOSSecurityMixin):
self.assertSameSet(['R-INSTANCE', subscription_reference],
user.getGroups())
# check project security group
self.login()
project = self.addProject()
instance.setFollowUpValue(project)
self.tic()
# clear cache in order to reset calculation
self.portal.portal_caches.clearAllCache()
self.login(user_id)
user = getSecurityManager().getUser()
self.assertTrue('Authenticated' in user.getRoles())
self.assertSameSet(['R-INSTANCE', subscription_reference,
project.getReference(),
'%s_R-INSTANCE' % project.getReference()],
user.getGroups())
def test_inactive(self, login_portal_type="Certificate Login"):
user_id = self._generateRandomUniqueUserId(self.portal_type)
reference = self._generateRandomUniqueReference(self.portal_type)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment