Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ class OrganizationServiceIntegrationTest : CsmRedisTestBase() {
component = "organization",
roles =
mutableMapOf(
ROLE_NONE to mutableListOf<String>(),
ROLE_VIEWER to mutableListOf(PERMISSION_READ),
ROLE_USER to
mutableListOf(
Expand All @@ -646,6 +647,7 @@ class OrganizationServiceIntegrationTest : CsmRedisTestBase() {
component = "workspace",
roles =
mutableMapOf(
ROLE_NONE to mutableListOf<String>(),
ROLE_VIEWER to mutableListOf(PERMISSION_READ),
ROLE_USER to
mutableListOf(
Expand All @@ -671,6 +673,7 @@ class OrganizationServiceIntegrationTest : CsmRedisTestBase() {
component = "scenario",
roles =
mutableMapOf(
ROLE_NONE to mutableListOf<String>(),
ROLE_VIEWER to mutableListOf(PERMISSION_READ),
ROLE_EDITOR to
mutableListOf(
Expand Down Expand Up @@ -999,19 +1002,6 @@ class OrganizationServiceIntegrationTest : CsmRedisTestBase() {
}
}

@Test
fun `addOrganizationAccessControl as resource admin (ROLE_NONE)`() {
assertThrows<CsmClientException> {
val name = "o-connector-test-1"
val organizationRegistered =
organizationApiService.registerOrganization(createTestOrganization(name))

val otherUserACL = OrganizationAccessControl(id = OTHER_TEST_USER_ID, role = ROLE_NONE)
organizationApiService.addOrganizationAccessControl(
organizationRegistered.id!!, otherUserACL)
}
}

@Test
fun `addOrganizationAccessControl as not resource admin and PERMISSION_WRITE_SECURITY`() {
assertDoesNotThrow {
Expand Down Expand Up @@ -1845,6 +1835,7 @@ class OrganizationServiceIntegrationTest : CsmRedisTestBase() {
component = "organization",
roles =
mutableMapOf(
ROLE_NONE to mutableListOf<String>(),
ROLE_VIEWER to mutableListOf(PERMISSION_READ),
ROLE_USER to
mutableListOf(
Expand All @@ -1870,6 +1861,7 @@ class OrganizationServiceIntegrationTest : CsmRedisTestBase() {
component = "workspace",
roles =
mutableMapOf(
ROLE_NONE to mutableListOf<String>(),
ROLE_VIEWER to mutableListOf(PERMISSION_READ),
ROLE_USER to
mutableListOf(
Expand All @@ -1895,6 +1887,7 @@ class OrganizationServiceIntegrationTest : CsmRedisTestBase() {
component = "scenario",
roles =
mutableMapOf(
ROLE_NONE to mutableListOf<String>(),
ROLE_VIEWER to mutableListOf(PERMISSION_READ),
ROLE_EDITOR to
mutableListOf(
Expand Down Expand Up @@ -2298,19 +2291,6 @@ class OrganizationServiceIntegrationTest : CsmRedisTestBase() {
}
}

@Test
fun `addOrganizationAccessControl as resource admin (ROLE_NONE)`() {
assertThrows<CsmClientException> {
val name = "o-connector-test-1"
val organizationRegistered =
organizationApiService.registerOrganization(createTestOrganization(name))

val otherUserACL = OrganizationAccessControl(id = OTHER_TEST_USER_ID, role = ROLE_NONE)
organizationApiService.addOrganizationAccessControl(
organizationRegistered.id!!, otherUserACL)
}
}

@Test
fun `addOrganizationAccessControl as not resource admin and PERMISSION_WRITE_SECURITY`() {
assertDoesNotThrow {
Expand Down
Loading