-
Notifications
You must be signed in to change notification settings - Fork 30
implement apply access control to /validate endpoints #2401
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
Conversation
b3c4a3e
to
f306ea3
Compare
Plan Result (aat)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few suggestions.
And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] | ||
And the response [contains the TTL.OverrideTTL from the previouse data] | ||
And the response [does not contain the TTL.Suspended as removed by callback (null -> missing)] | ||
And the response [does not contain the TTL as citizen user has no access] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to re-work the tests in this PR (whether as part of this ticket or temporarily disabling here to be fixed in another ticket) so that they retain their original purpose of what they were actually trying to test, as now we're applying AC here it's no longer actually verifying the scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assigning the necessary roles to the user for the TTL field solves the /validate scenarios but breaks about 20 different scenarios. Also, creating and assigning a new role just to access this field causes a similar problem. Since the TTL field is very dependent on scenarios, it would be better to reorganise the 5 scenarios that fail for /validate by adding a new field. Therefore I am disabling them and will create a new ticket.
@@ -198,4 +200,12 @@ private static String getValue(@NonNull JsonNode jsonNode) { | |||
} | |||
return returnValue; | |||
} | |||
|
|||
public static Map<String, JsonNode> convertValueInDataField(Object from) { | |||
Map<String, JsonNode> map = MAPPER.convertValue(from, new TypeReference<HashMap<String, JsonNode>>() {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Map<String, JsonNode> map = MAPPER.convertValue(from, new TypeReference<HashMap<String, JsonNode>>() {}); | |
Map<String, JsonNode> map = convertValue(from); |
Looks like we are just re-using the implementation for this anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done 👍
...ain/java/uk/gov/hmcts/ccd/domain/service/validate/AuthorisedValidateCaseFieldsOperation.java
Show resolved
Hide resolved
...ain/java/uk/gov/hmcts/ccd/domain/service/validate/AuthorisedValidateCaseFieldsOperation.java
Show resolved
Hide resolved
29ec4b8
to
44e9c3d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danlysiak @RebeccaBaker I have created CCD-5434 for the disabled FTs.
combined with ccd-6022 in #2545 |
JIRA link (if applicable)
https://tools.hmcts.net/jira/browse/CCD-5344
Change description
Does this PR introduce a breaking change? (check one with "x")