You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a contact is associated with facility created we create a Casbin policy to allow that contact to view that the associated facility. This, coupled with short lived tokens, enable the self check-in functionality. Currently, any edits to an email address do not result in updates to the policy.
To Reproduce
Steps to reproduce the behavior:
Perform self check in with an existing contact that has an email address
Update the email address of that contact
Attempt another self check in
Expected behavior
The self checkin after email update should succeed.
Environment
n/a
Additional context
The fix should also include removal of the policy associated with the old email address.
Here's the code that was used to create the policy when linking the entity and contact:
if (typeof contact.email !== 'undefined' && contact.email.length > 0) {
for (const email of contact.email) {
const p = [email.address, `/entity/${ec.entityId}`, '(GET)|(POST)']
await e.addPolicy(...p)
}
The text was updated successfully, but these errors were encountered:
Describe the bug
When a contact is associated with facility created we create a Casbin policy to allow that contact to view that the associated facility. This, coupled with short lived tokens, enable the self check-in functionality. Currently, any edits to an email address do not result in updates to the policy.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The self checkin after email update should succeed.
Environment
n/a
Additional context
The fix should also include removal of the policy associated with the old email address.
Here's the code that was used to create the policy when linking the entity and contact:
The text was updated successfully, but these errors were encountered: