Open Comeani opened 4 months ago
This is becoming an increasingly high priority item, it would be good to focus on it after we have keystone's limit update functionality running in production.
User emails should come from LDAP. See https://github.com/pitt-crc/crc-ops/issues/9.
Here are some thoughts that have been kicking around a scratch page in my notebook:
Fields, relationships, and methods for each model.
Notification |
---|
|
|
Preference |
---|
|
|
DefaultPreference* |
---|
|
* This table should be a singleton that only ever stores one record.
Functions that go inside shortcuts.py
.
def notify(user: User, message: str) -> None:
# fetch email address from User table
# send email (or log error)
# update notification DB
The endpoints are mostly structured he same way we set up every other app with two exceptions:
/defaults/
and /defaults/<pk>
, there is only a single endpoint /defaults
which returns default settingsprferences/<pk>
may be cumbersome.Also, it's worth noting in the above that I have used an array field, which means we would have to drop support for SQLite and run PostgreSQL exclusively.
The bank code prior to the last iteration had a system for notifying users when their proposal had either hit a threshold usage relative to the total amount awarded, or hit some threshold number of days into the proposal duration.
Basically having some way to notify users when they need to consider submitting another Resource Allocation Request is the intention of this feature.