Project

General

Profile

Actions

Defect #2149

closed

Notification about account creation is sent even if the operation fails

Added by Alena Peterová over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Vít Švanda
Category:
Provisioning
Target version:
Start date:
03/25/2020
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

Tested on version 10.1.0
When creation of the account fails on the system, notification about account creation with the password (acc:newPassword, provisioning-send-notification-processor) is sent, but it shouldn't be. Also when this operation is retried and it fails again, the notification is sent again.

Note: if the system is unavailable or read-only, the notification isn't sent (that is correct). The issue may be reproduced only if the create operation fails on the system, e.g.:
  • some constraint in DB fails
  • value too long for a column in DB
Actions #2

Updated by Vít Švanda over 4 years ago

  • Target version set to 10.2.0
Actions #3

Updated by Vít Švanda over 4 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Vít Švanda over 4 years ago

  • Status changed from In Progress to New
Actions #5

Updated by Vít Švanda over 4 years ago

  • Status changed from New to In Progress
Actions #6

Updated by Vít Švanda over 4 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Vít Švanda to Radek Tomiška
  • % Done changed from 0 to 90

Fixed. Problem was in the processor that sending a notification. I added check on state of provisioning operation. Notification is send only if provisioning operation result is in the state "EXECUTED" now.

I created tests for this case.

Commit: https://github.com/bcvsolutions/CzechIdMng/commit/5a5013a45c80c235dc1eeee2280ad197f26260b1

Actions #7

Updated by Radek Tomiška over 4 years ago

  • Status changed from Needs feedback to In Progress
  • Assignee changed from Radek Tomiška to Vít Švanda

I did code review, new condition should be moved to overriden AbstractEntityEventProcessor#conditional(EntityEvent) method instead.
Support method is used mainly for processor registration + with conditional method usage is not needed to cast content type.

Actions #8

Updated by Vít Švanda over 4 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Vít Švanda to Radek Tomiška
Actions #9

Updated by Radek Tomiška over 4 years ago

  • Status changed from Needs feedback to Closed
  • Assignee changed from Radek Tomiška to Vít Švanda
  • % Done changed from 90 to 100

I did test and review, it's awesome, thx!

Actions

Also available in: Atom PDF