Is this a regression?
Yes
Severity
🟠 Major – significantly affects usability
Please provide the branch(es) you discovered this issue in
v93
Environment Details
edge
Please provide a minimal set of steps to reproduce the issue
-
Create a custom shopping cart check in the API according to the official documentation.
see: https://github.com/OneIdentity/IdentityManager.ApiSdk/blob/v93/doc/05-composition-api-plugins.md
-
Fix the custom shopping cart item check by adding an empty constructor to the Sample CartItemCheck.
(Annotation if you don't fix it you will get an error during runtime)
add: "public SampleCheck() { } " to the code
public class SampleCheck : ICartItemCheck {
private readonly ICartItemCheckContext _context;
public SampleCheck() { } '<-- add this line !!!
public SampleCheck(ICartItemCheckContext context) {
...
=> result; no servor occurs during runtime
- Modify the SampleCheck- ProcessAsync-Task, in that way that the task always sets the Status to: CheckStatus.Error
internal async Task ProcessAsync(CancellationToken ct = default) {
Status = CheckStatus.Error; '<-- set Status to Error, independent from context
}
public CheckStatus Status { get; set; } = CheckStatus.Pending;
- Add three products to the shopping cart
- Goto the shopping cart
- Perform a check to the shopping cart
Description
The modified SampleCheck: ICartItemCheck was modified to return always CheckStatus: Error;
Hence all(!!!) products should have the CheckStatus: Error
But in UI-Result only one Product has a CheckStatus: Error, where else the other two products are marked with CheckStatus: ok:
Describe what you expected to happen versus what actually happened
As the SampleCheck always returns CheckStatus.Error in this case all three products should be marked to have an "Fehler" in the ui
Relevant logs or console output
Add a screenshot(s) if that helps illustrate the problem
No response
Suggested Fix
No response
Anything else?
The fact that the SampleCheck - class is instantiated without an context is an error in itself, because a SampleCheck - instance without a context cannot decide if the status is error or success and therefore it makes no sense. But exactly this happens. So I assume that is already the error. I assume if you find the codeline where the ICartItemCheck is instantiated without a context you found the bug.
Before submitting...
Is this a regression?
Yes
Severity
🟠 Major – significantly affects usability
Please provide the branch(es) you discovered this issue in
v93
Environment Details
edge
Please provide a minimal set of steps to reproduce the issue
Create a custom shopping cart check in the API according to the official documentation.
see: https://github.com/OneIdentity/IdentityManager.ApiSdk/blob/v93/doc/05-composition-api-plugins.md
Fix the custom shopping cart item check by adding an empty constructor to the Sample CartItemCheck.
(Annotation if you don't fix it you will get an error during runtime)
add: "public SampleCheck() { } " to the code
=> result; no servor occurs during runtime
Description
The modified SampleCheck: ICartItemCheck was modified to return always CheckStatus: Error;
Hence all(!!!) products should have the CheckStatus: Error
But in UI-Result only one Product has a CheckStatus: Error, where else the other two products are marked with CheckStatus: ok:
Describe what you expected to happen versus what actually happened
As the SampleCheck always returns CheckStatus.Error in this case all three products should be marked to have an "Fehler" in the ui
Relevant logs or console output
Add a screenshot(s) if that helps illustrate the problem
No response
Suggested Fix
No response
Anything else?
The fact that the SampleCheck - class is instantiated without an context is an error in itself, because a SampleCheck - instance without a context cannot decide if the status is error or success and therefore it makes no sense. But exactly this happens. So I assume that is already the error. I assume if you find the codeline where the ICartItemCheck is instantiated without a context you found the bug.
Before submitting...