Skip to content

CCD-4250 OrganisationsAssignedUsers recount #471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
cddec6e
CCD-4198 initial OrganisationAssignedUsers reset
mattnayler Jan 19, 2023
02eca5f
CCD-4198 temporary sonar exclusions
mattnayler Jan 19, 2023
1ff3175
CCD-4198 Move `s2s-authorised.services` parameter
mattnayler Jan 19, 2023
546de3b
Checkstyle fix
mattnayler Jan 19, 2023
1d88c8a
CCD-4198 Adjust logging for org user count process
mattnayler Jan 19, 2023
1146217
CCD-4198 temporary sonar exclusions
mattnayler Jan 19, 2023
f129e79
CCD-4198 Adjust ID filter for org user count
mattnayler Jan 19, 2023
07fd085
CCD-4198 reset count endpoint for multiple cases
mattnayler Jan 23, 2023
ece22ea
CCD-4198 reset org count controller tests
mattnayler Jan 23, 2023
e1249a0
CCD-4198 rename OrganisationAssignedUser: part 1
mattnayler Jan 23, 2023
565e7e0
CCD-4198 rename OrganisationAssignedUser: part 2
mattnayler Jan 23, 2023
9552e50
CCD-4198 Add OrganisationsAssignedUser FTAs
mattnayler Jan 23, 2023
cf5a34e
Merge remote-tracking branch 'origin/master' into CCD-4198
mattnayler Jan 23, 2023
c993f6f
CCD-4198 Adjust OrganisationAssignedUser props
mattnayler Jan 23, 2023
1a6b947
CCD-4198 Adjust OrganisationAssignedUser FTAs
mattnayler Jan 23, 2023
8e9dc3c
CCD-4198 Adjust OrganisationAssignedUser FTAs
mattnayler Jan 23, 2023
c69b1bb
CCD-4198 reset org count service tests
mattnayler Jan 24, 2023
2d80aec
CCD-4198 add OrganisationAssignedUser save_allowed config
mattnayler Jan 24, 2023
5394257
CCD-4198 adjust OrganisationAssignedUser S2S test
mattnayler Jan 25, 2023
6b74fb6
CCD-4198 expand OrganisationsAssignedUsers tests
mattnayler Jan 26, 2023
8031458
Merge remote-tracking branch 'origin/master' into CCD-4198
mattnayler Jan 26, 2023
76c7206
CCD-4198 minor review updates
mattnayler Jan 26, 2023
892ceef
Merge remote-tracking branch 'origin/master' into CCD-4198
mattnayler Jan 26, 2023
c7297d4
CCD-4198 adjust organisations users lookup
mattnayler Jan 27, 2023
bd32104
Merge branch 'master' into CCD-4198
mattnayler Feb 9, 2023
faab7e4
Merge branch 'master' into CCD-4198
lucianotmarsilio Feb 17, 2023
3fe76dd
Merge branch 'master' into CCD-4198
lucianotmarsilio Feb 22, 2023
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
1 change: 1 addition & 0 deletions Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def secrets = [
secret('definition-importer-username', 'DEFINITION_IMPORTER_USERNAME'),
secret('definition-importer-password', 'DEFINITION_IMPORTER_PASSWORD'),
secret('ccd-befta-caseworker-2-solicitor-1-pwd', 'CCD_BEFTA_CASEWORKER_2_SOLICITOR_1_PWD'),
secret('ccd-befta-master-caseworker-pwd', 'CCD_BEFTA_MASTER_CASEWORKER_PWD'),
secret('ccd-befta-master-solicitor1-pwd', 'CCD_BEFTA_MASTER_SOLICITOR_1_PWD'),
secret('ccd-befta-master-solicitor2-pwd', 'CCD_BEFTA_MASTER_SOLICITOR_2_PWD'),
secret('ccd-befta-master-solicitor3-pwd', 'CCD_BEFTA_MASTER_SOLICITOR_3_PWD'),
Expand Down
2 changes: 2 additions & 0 deletions aca-docker/bin/env_variables_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export CCD_BEFTA_PUI_CAA_1_PWD=Pa55word11
export CCD_BEFTA_SOLICITOR_4_PWD=Pa55word11
export TEST_URL=http://localhost:4454
export MCA_API_BASE_URL=http://host.docker.internal:4454
export MCA_CONDITIONAL_APIS_ORGS_ASSIGNED_USERS_ENABLED=true
export MCA_CONDITIONAL_APIS_ORGS_ASSIGNED_USERS_SAVE_ALLOWED=true

export [email protected]
export BEFTA_IDAM_CAA_PASSWORD=Pa55word11
Expand Down
3 changes: 3 additions & 0 deletions aca-docker/compose/aca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ services:
MANAGE_CASE_S2S_AUTHORISED_SERVICES: xui_webapp,ccd_data
CCD_DATA_STORE_API_BASE_URL: http://ccd-data-store-api:4452
CCD_DEFINITION_STORE_API_BASE_URL: http://ccd-definition-store-api:4451
ROLE_ASSIGNMENT_URL: "${ROLE_ASSIGNMENT_URL:-http://am-role-assignment-service:4096}"
PRD_HOST: http://aca-wiremock:8080
NOTIFY_MCA_API_KEY: "notify-test-api-key"
MCA_CONDITIONAL_APIS_ORGS_ASSIGNED_USERS_ENABLED: true
MCA_CONDITIONAL_APIS_ORGS_ASSIGNED_USERS_SAVE_ALLOWED: true
# Uncomment this line to enable JVM debugging and uncomment the port mapping below
# JAVA_TOOL_OPTIONS: '-XX:InitialRAMPercentage=30.0 -XX:MaxRAMPercentage=65.0 -XX:MinRAMPercentage=30.0 -XX:+UseConcMarkSweepGC -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005'
ports:
Expand Down
13 changes: 13 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'application'
id 'idea'
id 'jacoco'
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
id 'org.springframework.boot' version '2.6.10'
Expand Down Expand Up @@ -53,6 +54,18 @@ sourceSets {

}

idea {
module {
// config to allow Intellij to mark test source and resource files correctly to help linting tools
testSourceDirs += project.sourceSets.contractTest.java.srcDirs
testSourceDirs += project.sourceSets.functionalTest.java.srcDirs
testSourceDirs += project.sourceSets.integrationTest.java.srcDirs
testResourceDirs += project.sourceSets.contractTest.resources.srcDirs
testResourceDirs += project.sourceSets.functionalTest.resources.srcDirs
testResourceDirs += project.sourceSets.integrationTest.resources.srcDirs
}
}

tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ java:
S2S_URL: http://rpe-service-auth-provider-aat.service.core-compute-aat.internal
CCD_DATA_STORE_API_BASE_URL: http://ccd-data-store-api-pr-1260-java.ccd
CCD_DEFINITION_STORE_API_BASE_URL: http://ccd-definition-store-api-pr-575-java.ccd
ROLE_ASSIGNMENT_URL: http://am-role-assignment-service-pr-929-java.am
ROLE_ASSIGNMENT_URL: http://am-role-assignment-service-aat.service.core-compute-aat.internal
MANAGE_CASE_S2S_AUTHORISED_SERVICES: xui_webapp,ccd_data,finrem_case_orchestration,divorce_frontend,iac,nfdiv_cos,fpl_case_service,civil_service,prl_cos_api
MCA_CONDITIONAL_APIS_ORGS_ASSIGNED_USERS_ENABLED: true
MCA_CONDITIONAL_APIS_ORGS_ASSIGNED_USERS_SAVE_ALLOWED: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"_guid_": "F-210_Assign_Access_Without_OrgId_C1_Org1_QUK822N",
"_extends_": "F-210_Assign_Access__Base",

"specs": [
"to assign users to the case C1 but not update OrgCount - 2 users with same role"
],

"users": {
"Bill": {
"_extends_": "ACA_Users_Bill"
},
"Benjamin": {
"_extends_": "ACA_Users_Benjamin"
}
},

"request": {
"_extends_": "Common_Request",
"body": {
"case_users": [
{
"case_id": "${[scenarioContext][siblingContexts][F-210_Case_Creation_C1_With_Org_Policies_Both_Orgs][testData][actualResponse][body][id]}",
"case_role": "[ApplicantSolicitor]",
"user_id": "${[scenarioContext][testData][users][Bill][id]}"
},
{
"case_id": "${[scenarioContext][siblingContexts][F-210_Case_Creation_C1_With_Org_Policies_Both_Orgs][testData][actualResponse][body][id]}",
"case_role": "[ApplicantSolicitor]",
"user_id": "${[scenarioContext][testData][users][Benjamin][id]}"
}
]
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"_guid_": "F-210_Assign_Access_Without_OrgId_C1_Org2_LESTKK0",
"_extends_": "F-210_Assign_Access__Base",

"specs": [
"to assign users to the case C1 but not update OrgCount - 1 user with 2 roles"
],

"users": {
"Richard": {
"_extends_": "ACA_Users_Richard"
}
},

"request": {
"_extends_": "Common_Request",
"body": {
"case_users": [
{
"case_id": "${[scenarioContext][siblingContexts][F-210_Case_Creation_C1_With_Org_Policies_Both_Orgs][testData][actualResponse][body][id]}",
"case_role": "[RespondentSolicitor]",
"user_id": "${[scenarioContext][testData][users][Richard][id]}"
},
{
"case_id": "${[scenarioContext][siblingContexts][F-210_Case_Creation_C1_With_Org_Policies_Both_Orgs][testData][actualResponse][body][id]}",
"case_role": "[OtherPartySolicitor]",
"user_id": "${[scenarioContext][testData][users][Richard][id]}"
}
]
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"_guid_": "F-210_Assign_Access_Without_OrgId_C3_Org2_LESTKK0",
"_extends_": "F-210_Assign_Access__Base",

"specs": [
"to assign users to the case C3 but not update OrgCount - 1 user with 2 roles"
],

"users": {
"Richard": {
"_extends_": "ACA_Users_Richard"
}
},

"request": {
"_extends_": "Common_Request",
"body": {
"case_users": [
{
"case_id": "${[scenarioContext][siblingContexts][F-210_Case_Creation_C3_With_Org_Policies_Assigned_Good_Org_Bad_Org][testData][actualResponse][body][id]}",
"case_role": "[RespondentSolicitor]",
"user_id": "${[scenarioContext][testData][users][Richard][id]}"
},
{
"case_id": "${[scenarioContext][siblingContexts][F-210_Case_Creation_C3_With_Org_Policies_Assigned_Good_Org_Bad_Org][testData][actualResponse][body][id]}",
"case_role": "[OtherPartySolicitor]",
"user_id": "${[scenarioContext][testData][users][Richard][id]}"
}
]
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"_guid_": "F-210_Assign_Access__Base",
"_extends_": "Assign_Case_Access__Base",

"title": "Assign Access to Case",

"s2sClientId": "aac_manage_case_assignment",
"userTokenClientId": "xuiwebapp",

"users": {
"invokingUser": {
"_extends_": "ACA_Users_Caseworker_CAA"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"_guid_": "F-210_Delete_Access_With_OrgId_C1_Org1_QUK822N",
"_extends_": "F-210_Delete_Access__Base",

"specs": [
"to unassign users to the case C1 with update OrgCount - only 1 of 2 users"
],

"users": {
"Bill": {
"_extends_": "ACA_Users_Bill"
}
},

"request": {
"_extends_": "Common_Request",
"body": {
"case_users": [
{
"case_id": "${[scenarioContext][siblingContexts][F-210_Case_Creation_C1_With_Org_Policies_Both_Orgs][testData][actualResponse][body][id]}",
"case_role": "[ApplicantSolicitor]",
"user_id": "${[scenarioContext][testData][users][Bill][id]}",
"organisation_id": "QUK822N"
}
]
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"_guid_": "F-210_Delete_Access_With_OrgId_C1_Org2_LESTKK0",
"_extends_": "F-210_Delete_Access__Base",

"specs": [
"to unassign users to the case C1 with update OrgCount - 1 user but only only 1 of 2 roles"
],

"users": {
"Richard": {
"_extends_": "ACA_Users_Richard"
}
},

"request": {
"_extends_": "Common_Request",
"body": {
"case_users": [
{
"case_id": "${[scenarioContext][siblingContexts][F-210_Case_Creation_C1_With_Org_Policies_Both_Orgs][testData][actualResponse][body][id]}",
"case_role": "[RespondentSolicitor]",
"user_id": "${[scenarioContext][testData][users][Richard][id]}",
"organisation_id": "LESTKK0"
}
]
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"_guid_": "F-210_Delete_Access__Base",
"_extends_": "Delete_Case_Access__Base",

"title": "Delete Access to Case",

"s2sClientId": "aac_manage_case_assignment",
"userTokenClientId": "xuiwebapp",

"users": {
"invokingUser": {
"_extends_": "ACA_Users_Caseworker_CAA"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"_guid_": "F-210_Delete_Creator_Role_C1",
"_extends_": "F-210_Delete_Creator_Role__Base",

"specs": [
"to remove CREATOR assigned CaseRole for C1"
],

"request": {
"body": {
"case_users": [
{
"case_id": "${[scenarioContext][SiblingContexts][F-210_Case_Creation_C1_With_Org_Policies_Both_Orgs][testData][actualResponse][body][id]}",
"case_role": "[CREATOR]",
"user_id": "${[scenarioContext][testData][users][Richard][id]}"
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"_guid_": "F-210_Delete_Creator_Role_C2",
"_extends_": "F-210_Delete_Creator_Role__Base",

"specs": [
"to remove CREATOR assigned CaseRole for C2"
],

"request": {
"body": {
"case_users": [
{
"case_id": "${[scenarioContext][SiblingContexts][F-210_Case_Creation_C2_With_Org_Policies_Unassigned][testData][actualResponse][body][id]}",
"case_role": "[CREATOR]",
"user_id": "${[scenarioContext][testData][users][Richard][id]}"
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"_guid_": "F-210_Delete_Creator_Role_C3",
"_extends_": "F-210_Delete_Creator_Role__Base",

"specs": [
"to remove CREATOR assigned CaseRole for C3"
],

"request": {
"body": {
"case_users": [
{
"case_id": "${[scenarioContext][SiblingContexts][F-210_Case_Creation_C3_With_Org_Policies_Assigned_Good_Org_Bad_Org][testData][actualResponse][body][id]}",
"case_role": "[CREATOR]",
"user_id": "${[scenarioContext][testData][users][Richard][id]}"
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"_guid_": "F-210_Delete_Creator_Role_C4",
"_extends_": "F-210_Delete_Creator_Role__Base",

"specs": [
"to remove CREATOR assigned CaseRole for C4"
],

"request": {
"body": {
"case_users": [
{
"case_id": "${[scenarioContext][SiblingContexts][F-210_Case_Creation_C4_With_Org_Policies_Assigned_To_1_Org][testData][actualResponse][body][id]}",
"case_role": "[CREATOR]",
"user_id": "${[scenarioContext][testData][users][Richard][id]}"
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"_guid_": "F-210_Delete_Creator_Role__Base",
"_extends_": "F-210_Delete_Access__Base",

"title": "Remove Access to Case",

"specs": [
"to remove CREATOR assigned CaseRole"
],

"users": {
"Richard": {
"_extends_": "ACA_Users_Richard"
}
},

"request": {
"body": {
"case_users": [
]
}
}
}
Loading