Skip to content

feat(oneidentity): sync PEJ allowances from visit registration answers - #722

Merged
janosbabik merged 15 commits into
developfrom
feat-SCPEJAllowance
Oct 19, 2026
Merged

janosbabik merged 15 commits into
developfrom
feat-SCPEJAllowance

Conversation

@janosbabik

Copy link
Copy Markdown
Contributor

No description provided.

@janosbabik
janosbabik marked this pull request as draft September 11, 2026 14:35
Cancel site and system access independently, skipping missing or
already-cancelled records. Add regression tests for partial cleanup
and retries.
@janosbabik
janosbabik marked this pull request as ready for review October 5, 2026 11:15
janosbabik and others added 4 commits October 6, 2026 13:12
Send YYYY-MM-DD dates without extending the allowance end date.
updates

- Validate and log the configured process timezone
- Use DST-aware local calendar days for access and PEJ validity
- Start system access at the current instant
- Reconcile accesses independently and create missing active records
- Add regression tests and update documentation
withdrawn

- Reconcile allowance eligibility on visit updates without previous
  state
- Always delete allowances during visit deletion
- Add regression tests and update documentation

@yoganandaness yoganandaness left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me, although given my comments based on my understanding.

- Site and system access share the visit ID in `CustomProperty04`

### Access Updates
- Access records are matched by role and visit ID in `CustomProperty04`; both `Aborted` and `Unsubscribed` records are excluded

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When does a Record gets Aborted or Unsubscribed. Could we write here for better understanding.

Comment thread src/queue/consumers/oneidentity/README.md Outdated

// Clean up each access type independently so retries can finish partial deletions.
for (const { role, name } of accessTypes) {
const accesses = personWantsOrgs.filter(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand from the code that if the orderState is ABORTED or UNSUBSCRIBED, we dont delete it. So the record(site and system access) stays.

What happens, if the orderState is changed to ACTIVE(or the equivalent). This will give them access to site and system, even though their Visit in User Office is deleted?

janosbabik and others added 4 commits October 15, 2026 11:41
Co-authored-by: Yoganandan Pandiyan <132274772+yoganandaness@users.noreply.github.com>
Ignore request status so User Officers can approve unrequested
allowances.
Preserve backward compatibility for legacy visit messages.
@janosbabik
janosbabik merged commit 16b03f2 into develop Oct 19, 2026
9 checks passed
@janosbabik
janosbabik deleted the feat-SCPEJAllowance branch October 19, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants