-
Notifications
You must be signed in to change notification settings - Fork 11
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
modify care team confirmation context for alerting #129
Conversation
cb2144f
to
d5687dc
Compare
ecacd3c
to
cafe1af
Compare
5af4513
to
735397c
Compare
a.sendModelAsResWithStatus(res, statusErr, http.StatusBadRequest) | ||
return | ||
} | ||
setPerms, err := a.gatekeeper.SetPermissions(inviteeID, invitorID, ctc.Permissions) |
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 permissions must include the new "follow" permission and validate that the new permission is present in the request body if alertsConfig is not empty.
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.
That's fair. In theory, the alerts config that existed would be ignored without the permissions to match it, but there's also no sense in storing the alerts config if they don't have the permission. I'll make the change.
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.
Also worth noting, that the new alerting permission isn't added yet. That happens in #126. I'm making a note to address it there.
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've now addressed this in #126.
735397c
to
606f8d8
Compare
Care team invitation/confirmation contexts are currently a clients.Permissions object. To support alerting, the context is extended to include a alerts.Config (defined in platform). The custom JSON unmarshaler allows flexibility in parsing the following received contexts: 1. The existing permissions only context 2. A hybrid context with old-style permissions plus an alertsConfig 3. A future context with a "Permissions" and an alertsConfig as sibling properties When the API is migrated to scenario #3 above, the custom marshaler can be removed. Bringing in platform as a dependency brought many vendor changes as well. Part of BACK-2500
606f8d8
to
20eebcc
Compare
This struct property was changed in platform. This is the corresponding change. BACK-2500
Closing this, as it's been consumed by #126 |
Care team invitation/confirmation contexts are currently a clients.Permissions object. To support alerting, the context is extended to include a models.AlertsConfig.
The custom JSON unmarshaler allows flexibility in parsing the following received contexts:
When the API is migrated to scenario #3 above, the custom marshaler can be removed.
Pulling in platform as a dependency brought a lot of vendor changes with it.
Part of BACK-2500