diff --git a/src/main/kotlin/com/cosmotech/api/clients/EventBusClient.kt b/src/main/kotlin/com/cosmotech/api/clients/EventBusClient.kt deleted file mode 100644 index 11bc5920..00000000 --- a/src/main/kotlin/com/cosmotech/api/clients/EventBusClient.kt +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Cosmo Tech. -// Licensed under the MIT license. -package com.cosmotech.api.clients - -import com.cosmotech.api.scenario.MetaData - -@Deprecated("Will be removed once cosmotech-api-scenario and cosmotech-api-scenariorun are removed") -interface EventBusClient { - fun sendMetaData( - fullyQualifiedNamespace: String, - eventHubName: String, - sharedAccessPolicy: String, - sharedAccessKey: String, - metaData: MetaData - ) - - fun sendMetaData(fullyQualifiedNamespace: String, eventHubName: String, metaData: MetaData) -} diff --git a/src/main/kotlin/com/cosmotech/api/clients/ResultDataClient.kt b/src/main/kotlin/com/cosmotech/api/clients/ResultDataClient.kt deleted file mode 100644 index f2b4c968..00000000 --- a/src/main/kotlin/com/cosmotech/api/clients/ResultDataClient.kt +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Cosmo Tech. -// Licensed under the MIT license. -package com.cosmotech.api.clients - -import com.cosmotech.api.scenariorun.DataIngestionState - -@Deprecated("Will be removed once cosmotech-api-scenario and cosmotech-api-scenariorun are removed") -interface ResultDataClient { - - fun deleteDataFromADXbyExtentShard( - organizationId: String, - workspaceKey: String, - extentShard: String - ): String - - fun getStateFor( - organizationId: String, - workspaceKey: String, - scenarioRunId: String, - csmSimulationRun: String - ): DataIngestionState -} diff --git a/src/main/kotlin/com/cosmotech/api/clients/impl/DummyEventBusClient.kt b/src/main/kotlin/com/cosmotech/api/clients/impl/DummyEventBusClient.kt deleted file mode 100644 index ea968972..00000000 --- a/src/main/kotlin/com/cosmotech/api/clients/impl/DummyEventBusClient.kt +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Cosmo Tech. -// Licensed under the MIT license. -package com.cosmotech.api.clients.impl - -import com.cosmotech.api.clients.EventBusClient -import com.cosmotech.api.scenario.MetaData -import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression -import org.springframework.stereotype.Component - -@Component -@Deprecated("Will be removed once cosmotech-api-scenario and cosmotech-api-scenario are removed") -@ConditionalOnExpression("'\${csm.platform.internalResultServices.enabled}' == 'true'") -class DummyEventBusClient : EventBusClient { - - override fun sendMetaData( - fullyQualifiedNamespace: String, - eventHubName: String, - sharedAccessPolicy: String, - sharedAccessKey: String, - metaData: MetaData - ) { - TODO("Not yet implemented") - } - - override fun sendMetaData( - fullyQualifiedNamespace: String, - eventHubName: String, - metaData: MetaData - ) { - TODO("Not yet implemented") - } -} diff --git a/src/main/kotlin/com/cosmotech/api/clients/impl/DummyResultDataClient.kt b/src/main/kotlin/com/cosmotech/api/clients/impl/DummyResultDataClient.kt deleted file mode 100644 index 65d2cc01..00000000 --- a/src/main/kotlin/com/cosmotech/api/clients/impl/DummyResultDataClient.kt +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Cosmo Tech. -// Licensed under the MIT license. -package com.cosmotech.api.clients.impl - -import com.cosmotech.api.clients.ResultDataClient -import com.cosmotech.api.scenariorun.DataIngestionState -import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression -import org.springframework.stereotype.Component - -@Component -@Deprecated("Will be removed once cosmotech-api-scenario and cosmotech-api-scenario are removed") -@ConditionalOnExpression("'\${csm.platform.internalResultServices.enabled}' == 'true'") -class DummyResultDataClient : ResultDataClient { - - override fun deleteDataFromADXbyExtentShard( - organizationId: String, - workspaceKey: String, - extentShard: String - ): String { - TODO("Not yet implemented") - } - - override fun getStateFor( - organizationId: String, - workspaceKey: String, - scenarioRunId: String, - csmSimulationRun: String - ): DataIngestionState { - TODO("Not yet implemented") - } -} diff --git a/src/main/kotlin/com/cosmotech/api/config/CsmPlatformProperties.kt b/src/main/kotlin/com/cosmotech/api/config/CsmPlatformProperties.kt index 79e016b8..90236a37 100644 --- a/src/main/kotlin/com/cosmotech/api/config/CsmPlatformProperties.kt +++ b/src/main/kotlin/com/cosmotech/api/config/CsmPlatformProperties.kt @@ -175,7 +175,6 @@ data class CsmPlatformProperties( /** Container image to send data to DataWarehouse */ val sendDataWarehouse: String, - val scenarioDataUpload: String = "cosmo-tech/azure-storage-publish:latest", ) data class CsmContainers( @@ -502,8 +501,8 @@ data class CsmPlatformProperties( /** Twin cache query page information for workspace */ val workspace: PageSizing = PageSizing(), - /** Twin cache query page information for scenario */ - val scenario: PageSizing = PageSizing(), + /** Twin cache query page information for runner */ + val runner: PageSizing = PageSizing(), /** Twin cache query page information for connector */ val connector: PageSizing = PageSizing(), @@ -511,8 +510,8 @@ data class CsmPlatformProperties( /** Twin cache query page information for dataset */ val dataset: PageSizing = PageSizing(), - /** Twin cache query page information for scenariorun */ - val scenariorun: PageSizing = PageSizing(), + /** Twin cache query page information for run */ + val run: PageSizing = PageSizing(), /** Twin cache query page information for solution */ val solution: PageSizing = PageSizing(), diff --git a/src/main/kotlin/com/cosmotech/api/events/CsmRequestResponseEvents.kt b/src/main/kotlin/com/cosmotech/api/events/CsmRequestResponseEvents.kt index 574a2461..489d9480 100644 --- a/src/main/kotlin/com/cosmotech/api/events/CsmRequestResponseEvents.kt +++ b/src/main/kotlin/com/cosmotech/api/events/CsmRequestResponseEvents.kt @@ -2,8 +2,6 @@ // Licensed under the MIT license. package com.cosmotech.api.events -import java.time.ZonedDateTime - sealed class CsmRequestResponseEvent(publisher: Any) : CsmEvent(publisher) { var response: T? = null } @@ -14,20 +12,6 @@ class WorkflowStatusRequest( val workflowName: String, ) : CsmRequestResponseEvent(publisher) -class ScenarioDataDownloadRequest( - publisher: Any, - val jobId: String, - val organizationId: String, - val workspaceId: String, - val scenarioId: String -) : CsmRequestResponseEvent>(publisher) - -class ScenarioDataDownloadJobInfoRequest( - publisher: Any, - val jobId: String, - val organizationId: String, -) : CsmRequestResponseEvent>(publisher) - class WorkflowPhaseToStateRequest( publisher: Any, val organizationId: String, @@ -36,20 +20,6 @@ class WorkflowPhaseToStateRequest( val workflowPhase: String?, ) : CsmRequestResponseEvent(publisher) -class ScenarioRunEndToEndStateRequest( - publisher: Any, - val organizationId: String, - val workspaceId: String, - val scenarioRunId: String -) : CsmRequestResponseEvent(publisher) - -class ScenarioRunEndTimeRequest( - publisher: Any, - val organizationId: String, - val workspaceId: String, - val scenarioRunId: String -) : CsmRequestResponseEvent(publisher) - class AddDatasetToWorkspace( publisher: Any, val organizationId: String, diff --git a/src/main/kotlin/com/cosmotech/api/events/ScenarioEvents.kt b/src/main/kotlin/com/cosmotech/api/events/ScenarioEvents.kt deleted file mode 100644 index 864888f1..00000000 --- a/src/main/kotlin/com/cosmotech/api/events/ScenarioEvents.kt +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Cosmo Tech. -// Licensed under the MIT license. -package com.cosmotech.api.events - -class UserAddedToScenario( - publisher: Any, - val organizationId: String, - val userId: String, - val roles: List? = null -) : CsmEvent(publisher) - -class UserRemovedFromScenario( - publisher: Any, - val organizationId: String, - val workspaceId: String, - val scenarioId: String, - val userId: String -) : CsmEvent(publisher) - -class ScenarioDatasetListChanged( - publisher: Any, - val organizationId: String, - val workspaceId: String, - val scenarioId: String, - val datasetList: List? -) : CsmEvent(publisher) - -class ScenarioDeleted( - publisher: Any, - val organizationId: String, - val workspaceId: String, - val scenarioId: String -) : CsmEvent(publisher) - -class ScenarioLastRunChanged( - publisher: Any, - val organizationId: String, - val workspaceId: String, - val scenario: Any -) : CsmEvent(publisher) diff --git a/src/main/kotlin/com/cosmotech/api/events/ScenarioRunEvents.kt b/src/main/kotlin/com/cosmotech/api/events/ScenarioRunEvents.kt deleted file mode 100644 index 9a6e0552..00000000 --- a/src/main/kotlin/com/cosmotech/api/events/ScenarioRunEvents.kt +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Cosmo Tech. -// Licensed under the MIT license. -@file:Suppress("MatchingDeclarationName", "Filename") - -package com.cosmotech.api.events - -class ScenarioRunStartedForScenario( - publisher: Any, - val organizationId: String, - val workspaceId: String, - val scenarioId: String, - val scenarioRunData: ScenarioRunData, - val workflowData: WorkflowData -) : CsmEvent(publisher) { - data class ScenarioRunData(val scenarioRunId: String, val csmSimulationRun: String) - data class WorkflowData(val workflowId: String, val workflowName: String) -} diff --git a/src/main/kotlin/com/cosmotech/api/rbac/RolesDefinition.kt b/src/main/kotlin/com/cosmotech/api/rbac/RolesDefinition.kt index 5964ab4e..faf32602 100644 --- a/src/main/kotlin/com/cosmotech/api/rbac/RolesDefinition.kt +++ b/src/main/kotlin/com/cosmotech/api/rbac/RolesDefinition.kt @@ -38,17 +38,17 @@ val COMMON_ROLE_ADMIN_PERMISSIONS = ) // Scenario roles & permissions -val SCENARIO_ROLE_VIEWER_PERMISSIONS = listOf(PERMISSION_READ, PERMISSION_READ_SECURITY) -val SCENARIO_ROLE_EDITOR_PERMISSIONS = +val RUNNER_ROLE_VIEWER_PERMISSIONS = listOf(PERMISSION_READ, PERMISSION_READ_SECURITY) +val RUNNER_ROLE_EDITOR_PERMISSIONS = listOf(PERMISSION_READ, PERMISSION_READ_SECURITY, PERMISSION_LAUNCH, PERMISSION_WRITE) -val SCENARIO_ROLE_VALIDATOR_PERMISSIONS = +val RUNNER_ROLE_VALIDATOR_PERMISSIONS = listOf( PERMISSION_READ, PERMISSION_READ_SECURITY, PERMISSION_LAUNCH, PERMISSION_WRITE, PERMISSION_VALIDATE) -val SCENARIO_ROLE_ADMIN_PERMISSIONS = +val RUNNER_ROLE_ADMIN_PERMISSIONS = listOf( PERMISSION_READ, PERMISSION_READ_SECURITY, @@ -77,8 +77,8 @@ fun getAllRolesDefinition(): Map> .permissions .mapValues { it.value.toMutableList() } .toMutableMap(), - "scenario" to - getScenarioRolesDefinition() + "runner" to + getRunnerRolesDefinition() .permissions .mapValues { it.value.toMutableList() } .toMutableMap()) @@ -100,14 +100,14 @@ fun getCommonRolesDefinition(): RolesDefinition { adminRole = ROLE_ADMIN) } -fun getScenarioRolesDefinition(): RolesDefinition { +fun getRunnerRolesDefinition(): RolesDefinition { return RolesDefinition( permissions = mutableMapOf( - ROLE_VIEWER to SCENARIO_ROLE_VIEWER_PERMISSIONS, - ROLE_EDITOR to SCENARIO_ROLE_EDITOR_PERMISSIONS, - ROLE_VALIDATOR to SCENARIO_ROLE_VALIDATOR_PERMISSIONS, - ROLE_ADMIN to SCENARIO_ROLE_ADMIN_PERMISSIONS, + ROLE_VIEWER to RUNNER_ROLE_VIEWER_PERMISSIONS, + ROLE_EDITOR to RUNNER_ROLE_EDITOR_PERMISSIONS, + ROLE_VALIDATOR to RUNNER_ROLE_VALIDATOR_PERMISSIONS, + ROLE_ADMIN to RUNNER_ROLE_ADMIN_PERMISSIONS, ), adminRole = ROLE_ADMIN) } diff --git a/src/main/kotlin/com/cosmotech/api/scenario/MetaData.kt b/src/main/kotlin/com/cosmotech/api/scenario/MetaData.kt deleted file mode 100644 index 61249fac..00000000 --- a/src/main/kotlin/com/cosmotech/api/scenario/MetaData.kt +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) Cosmo Tech. -// Licensed under the MIT license. -package com.cosmotech.api.scenario - -public interface MetaData diff --git a/src/main/kotlin/com/cosmotech/api/scenario/ScenarioMetaData.kt b/src/main/kotlin/com/cosmotech/api/scenario/ScenarioMetaData.kt deleted file mode 100644 index ce9db02b..00000000 --- a/src/main/kotlin/com/cosmotech/api/scenario/ScenarioMetaData.kt +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Cosmo Tech. -// Licensed under the MIT license. -package com.cosmotech.api.scenario - -data class ScenarioMetaData( - val organizationId: String, - val workspaceId: String, - val scenarioId: String, - val name: String, - val description: String, - val parentId: String, - val solutionName: String, - val runTemplateName: String, - val validationStatus: String, - val updateTime: String -) : MetaData diff --git a/src/main/kotlin/com/cosmotech/api/scenario/ScenarioRunMetaData.kt b/src/main/kotlin/com/cosmotech/api/scenario/ScenarioRunMetaData.kt deleted file mode 100644 index 3a6e8f8a..00000000 --- a/src/main/kotlin/com/cosmotech/api/scenario/ScenarioRunMetaData.kt +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Cosmo Tech. -// Licensed under the MIT license. -package com.cosmotech.api.scenario - -class ScenarioRunMetaData( - val simulationRun: String, - val scenarioId: String, - val scenarioRunStartTime: String, -) : MetaData diff --git a/src/main/kotlin/com/cosmotech/api/scenariorun/DataIngestionState.kt b/src/main/kotlin/com/cosmotech/api/scenariorun/DataIngestionState.kt deleted file mode 100644 index 4beb73f4..00000000 --- a/src/main/kotlin/com/cosmotech/api/scenariorun/DataIngestionState.kt +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Cosmo Tech. -// Licensed under the MIT license. -package com.cosmotech.api.scenariorun - -enum class DataIngestionState { - InProgress, - Successful, - Failure, - Unknown -} diff --git a/src/main/kotlin/com/cosmotech/api/security/AbstractSecurityConfiguration.kt b/src/main/kotlin/com/cosmotech/api/security/AbstractSecurityConfiguration.kt index 375a41d6..72d91eeb 100644 --- a/src/main/kotlin/com/cosmotech/api/security/AbstractSecurityConfiguration.kt +++ b/src/main/kotlin/com/cosmotech/api/security/AbstractSecurityConfiguration.kt @@ -31,16 +31,10 @@ const val ROLE_DATASET_READER = "Dataset.Reader" const val ROLE_DATASET_WRITER = "Dataset.Writer" const val ROLE_ORGANIZATION_READER = "Organization.Reader" const val ROLE_ORGANIZATION_WRITER = "Organization.Writer" -const val ROLE_SCENARIO_READER = "Scenario.Reader" -const val ROLE_SCENARIO_WRITER = "Scenario.Writer" -const val ROLE_SCENARIORUN_READER = "ScenarioRun.Reader" -const val ROLE_SCENARIORUN_WRITER = "ScenarioRun.Writer" const val ROLE_SOLUTION_READER = "Solution.Reader" const val ROLE_SOLUTION_WRITER = "Solution.Writer" const val ROLE_WORKSPACE_READER = "Workspace.Reader" const val ROLE_WORKSPACE_WRITER = "Workspace.Writer" -const val ROLE_TWIN_GRAPH_READER = "Twingraph.Reader" -const val ROLE_TWIN_GRAPH_WRITER = "Twingraph.Writer" // Allowed read scopes const val SCOPE_CONNECTOR_READ = "SCOPE_csm.connector.read" @@ -48,9 +42,6 @@ const val SCOPE_ORGANIZATION_READ = "SCOPE_csm.organization.read" const val SCOPE_DATASET_READ = "SCOPE_csm.dataset.read" const val SCOPE_SOLUTION_READ = "SCOPE_csm.solution.read" const val SCOPE_WORKSPACE_READ = "SCOPE_csm.workspace.read" -const val SCOPE_SCENARIO_READ = "SCOPE_csm.scenario.read" -const val SCOPE_SCENARIORUN_READ = "SCOPE_csm.scenariorun.read" -const val SCOPE_TWIN_GRAPH_READ = "SCOPE_csm.twingraph.read" // Allowed write scopes const val SCOPE_CONNECTOR_WRITE = "SCOPE_csm.connector.write" @@ -58,9 +49,6 @@ const val SCOPE_ORGANIZATION_WRITE = "SCOPE_csm.organization.write" const val SCOPE_DATASET_WRITE = "SCOPE_csm.dataset.write" const val SCOPE_SOLUTION_WRITE = "SCOPE_csm.solution.write" const val SCOPE_WORKSPACE_WRITE = "SCOPE_csm.workspace.write" -const val SCOPE_SCENARIO_WRITE = "SCOPE_csm.scenario.write" -const val SCOPE_SCENARIORUN_WRITE = "SCOPE_csm.scenariorun.write" -const val SCOPE_TWIN_GRAPH_WRITE = "SCOPE_csm.twingraph.write" // Endpoints paths const val PATH_CONNECTORS = "/connectors" @@ -71,41 +59,6 @@ const val PATH_ORGANIZATIONS_SERVICES = "/organizations/*/services" val PATHS_ORGANIZATIONS = listOf(PATH_ORGANIZATIONS, PATH_ORGANIZATIONS_USERS, PATH_ORGANIZATIONS_SERVICES) -// Path Scenarios -const val PATH_SCENARIOS = "/organizations/*/workspaces/*/scenarios" -const val PATH_SCENARIOS_COMPARE = "/organizations/*/workspaces/*/scenarios/*/compare" -const val PATH_SCENARIOS_USERS = "/organizations/*/workspaces/*/scenarios/*/users" -const val PATH_SCENARIOS_PARAMETERVALUES = - "/organizations/*/workspaces/*/scenarios/*/parameterValues" -val PATHS_SCENARIOS = - listOf( - PATH_SCENARIOS, - PATH_SCENARIOS_COMPARE, - PATH_SCENARIOS_USERS, - PATH_SCENARIOS_PARAMETERVALUES) - -// Path ScenarioRuns -const val PATH_SCENARIORUNS = "/organizations/*/scenarioruns" -const val PATH_SCENARIORUNS_STATUS = "/organizations/*/scenarioruns/*/status" -const val PATH_SCENARIORUNS_LOGS = "/organizations/*/scenarioruns/*/logs" -const val PATH_SCENARIORUNS_CUMULATEDLOGS = "/organizations/*/scenarioruns/*/cumulatedlogs" -const val PATH_SCENARIORUNS_WORKSPACES = "/organizations/*/workspaces/scenarioruns" -const val PATH_SCENARIORUNS_SCENARIOS = "/organizations/*/workspaces/*/scenarios/*/scenarioruns" -const val PATH_SCENARIORUNS_SCENARIOS_RUN = "/organizations/*/workspaces/*/scenarios/*/run" -val PATHS_SCENARIORUNS = - listOf( - PATH_SCENARIORUNS, - PATH_SCENARIORUNS_STATUS, - PATH_SCENARIORUNS_LOGS, - PATH_SCENARIORUNS_CUMULATEDLOGS, - PATH_SCENARIORUNS_WORKSPACES, - PATH_SCENARIORUNS_SCENARIOS) - -// Path ScenarioRunResults -const val PATH_SCENARIORUNRESULTS = - "/organizations/*/workspaces/*/scenarios/*/scenarioruns/*/probes" -val PATHS_SCENARIORUNRESULTS = listOf(PATH_SCENARIORUNRESULTS) - // Path Solutions const val PATH_SOLUTIONS = "/organizations/*/solutions" const val PATH_SOLUTIONS_PARAMETERS = "/organizations/*/solutions/*/parameters" @@ -127,32 +80,6 @@ const val PATH_WORKSPACES_USERS = "/organizations/*/workspaces/*/users" val PATHS_WORKSPACES = listOf(PATH_WORKSPACES, PATH_WORKSPACES_USERS) const val PATH_WORKSPACES_FILES = "/organizations/*/workspaces/*/files" -// Path Job -const val PATH_JOB_STATUS = "/organizations/*/job/*/status" -val PATHS_JOB = listOf(PATH_JOB_STATUS) - -// Path Twingraph -const val PATH_TWIN_GRAPH_IMPORT = "/organizations/*/twingraph/import" -const val PATH_TWIN_GRAPH = "/organizations/*/twingraph" -const val PATH_TWIN_GRAPHS = "/organizations/*/twingraphs" -const val PATH_TWIN_GRAPH_QUERY = "/organizations/*/twingraph/*/query" -const val PATH_TWIN_GRAPH_BATCH_QUERY = "/organizations/*/twingraph/*/batch-query" -const val PATH_TWIN_GRAPH_BULK_DOWNLOAD = "/organizations/*/twingraph/download" -const val PATH_TWIN_GRAPH_ENTITY = "/organizations/*/twingraph/*/entity" -const val PATH_TWIN_GRAPH_METADATA = "/organizations/*/twingraph/*/metadata" -const val PATH_TWIN_GRAPH_BATCH_ACTIONS = "/organizations/*/twingraph/*/batch" -val PATHS_TWIN_GRAPH = - listOf( - PATH_TWIN_GRAPH_IMPORT, - PATH_TWIN_GRAPH, - PATH_TWIN_GRAPHS, - PATH_TWIN_GRAPH_QUERY, - PATH_TWIN_GRAPH_BATCH_QUERY, - PATH_TWIN_GRAPH_BULK_DOWNLOAD, - PATH_TWIN_GRAPH_ENTITY, - PATH_TWIN_GRAPH_METADATA, - PATH_TWIN_GRAPH_BATCH_ACTIONS) - // Endpoints roles val endpointSecurityPublic = listOf( @@ -226,50 +153,6 @@ internal fun endpointSecurityReaders( customOrganizationUser, customOrganizationViewer), customAdmin = customOrganizationAdmin), - CsmSecurityEndpointsRolesReader( - paths = PATHS_SCENARIOS, - roles = - arrayOf( - ROLE_SCENARIO_READER, - ROLE_SCENARIO_WRITER, - ROLE_ORGANIZATION_ADMIN, - ROLE_ORGANIZATION_COLLABORATOR, - ROLE_ORGANIZATION_MODELER, - ROLE_ORGANIZATION_USER, - ROLE_ORGANIZATION_VIEWER, - SCOPE_SCENARIO_READ, - SCOPE_SCENARIO_WRITE, - customOrganizationUser, - customOrganizationViewer), - customAdmin = customOrganizationAdmin), - CsmSecurityEndpointsRolesReader( - paths = PATHS_SCENARIORUNS, - roles = - arrayOf( - ROLE_SCENARIORUN_READER, - ROLE_SCENARIORUN_WRITER, - ROLE_ORGANIZATION_ADMIN, - ROLE_ORGANIZATION_COLLABORATOR, - ROLE_ORGANIZATION_MODELER, - ROLE_ORGANIZATION_USER, - SCOPE_SCENARIORUN_READ, - SCOPE_SCENARIORUN_WRITE, - customOrganizationUser), - customAdmin = customOrganizationAdmin), - CsmSecurityEndpointsRolesReader( - paths = PATHS_SCENARIORUNRESULTS, - roles = - arrayOf( - ROLE_SCENARIORUN_READER, - ROLE_SCENARIORUN_WRITER, - ROLE_ORGANIZATION_ADMIN, - ROLE_ORGANIZATION_COLLABORATOR, - ROLE_ORGANIZATION_MODELER, - ROLE_ORGANIZATION_USER, - SCOPE_SCENARIORUN_READ, - SCOPE_SCENARIORUN_WRITE, - customOrganizationUser), - customAdmin = customOrganizationAdmin), CsmSecurityEndpointsRolesReader( paths = PATHS_SOLUTIONS, roles = @@ -303,38 +186,6 @@ internal fun endpointSecurityReaders( SCOPE_WORKSPACE_WRITE, customOrganizationUser, customOrganizationViewer), - customAdmin = customOrganizationAdmin), - CsmSecurityEndpointsRolesReader( - paths = PATHS_TWIN_GRAPH, - roles = - arrayOf( - ROLE_TWIN_GRAPH_READER, - ROLE_TWIN_GRAPH_WRITER, - ROLE_ORGANIZATION_ADMIN, - ROLE_ORGANIZATION_COLLABORATOR, - ROLE_ORGANIZATION_MODELER, - ROLE_ORGANIZATION_USER, - ROLE_ORGANIZATION_VIEWER, - SCOPE_TWIN_GRAPH_READ, - SCOPE_TWIN_GRAPH_WRITE, - customOrganizationUser, - customOrganizationViewer), - customAdmin = customOrganizationAdmin), - CsmSecurityEndpointsRolesReader( - paths = PATHS_JOB, - roles = - arrayOf( - ROLE_TWIN_GRAPH_READER, - ROLE_TWIN_GRAPH_WRITER, - ROLE_ORGANIZATION_ADMIN, - ROLE_ORGANIZATION_COLLABORATOR, - ROLE_ORGANIZATION_MODELER, - ROLE_ORGANIZATION_USER, - ROLE_ORGANIZATION_VIEWER, - SCOPE_TWIN_GRAPH_READ, - SCOPE_TWIN_GRAPH_WRITE, - customOrganizationUser, - customOrganizationViewer), customAdmin = customOrganizationAdmin)) @Suppress("LongMethod") @@ -366,42 +217,6 @@ internal fun endpointSecurityWriters( arrayOf( ROLE_ORGANIZATION_WRITER, ROLE_ORGANIZATION_ADMIN, SCOPE_ORGANIZATION_WRITE), customAdmin = customOrganizationAdmin), - CsmSecurityEndpointsRolesWriter( - paths = PATHS_SCENARIOS, - roles = - arrayOf( - ROLE_SCENARIO_WRITER, - ROLE_ORGANIZATION_ADMIN, - ROLE_ORGANIZATION_COLLABORATOR, - ROLE_ORGANIZATION_MODELER, - ROLE_ORGANIZATION_USER, - SCOPE_SCENARIO_WRITE, - customOrganizationUser), - customAdmin = customOrganizationAdmin), - CsmSecurityEndpointsRolesWriter( - paths = PATHS_SCENARIORUNS, - roles = - arrayOf( - ROLE_SCENARIORUN_WRITER, - ROLE_ORGANIZATION_ADMIN, - ROLE_ORGANIZATION_COLLABORATOR, - ROLE_ORGANIZATION_MODELER, - ROLE_ORGANIZATION_USER, - SCOPE_SCENARIORUN_WRITE, - customOrganizationUser), - customAdmin = customOrganizationAdmin), - CsmSecurityEndpointsRolesWriter( - paths = PATHS_SCENARIORUNRESULTS, - roles = - arrayOf( - ROLE_SCENARIORUN_WRITER, - ROLE_ORGANIZATION_ADMIN, - ROLE_ORGANIZATION_COLLABORATOR, - ROLE_ORGANIZATION_MODELER, - ROLE_ORGANIZATION_USER, - SCOPE_SCENARIORUN_WRITE, - customOrganizationUser), - customAdmin = customOrganizationAdmin), CsmSecurityEndpointsRolesWriter( paths = PATHS_SOLUTIONS, roles = @@ -433,16 +248,6 @@ internal fun endpointSecurityWriters( SCOPE_WORKSPACE_WRITE, customOrganizationUser), customAdmin = customOrganizationAdmin), - CsmSecurityEndpointsRolesWriter( - paths = PATHS_TWIN_GRAPH, - roles = - arrayOf( - ROLE_TWIN_GRAPH_WRITER, - ROLE_ORGANIZATION_ADMIN, - ROLE_ORGANIZATION_COLLABORATOR, - ROLE_ORGANIZATION_MODELER, - SCOPE_TWIN_GRAPH_WRITE), - customAdmin = customOrganizationAdmin), ) abstract class AbstractSecurityConfiguration {