- Notifications
You must be signed in to change notification settings - Fork1.1k
feat: add notification for suspended/activated account#14367
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
20 commits Select commitHold shift + click to select a range
000a917 migrations
mtojek62cf15f notify
mtojek323680c fix
mtojekbbfb296 TestNotifyUserSuspended
mtojeke1b6c28 TestNotifyUserReactivate
mtojek9ef46de Merge branch 'main' into 17-suspended-reactivated
mtojekc7783ac post merge
mtojek55e4e13 fix escape
mtojek38bca28 TestNotificationTemplatesCanRender
mtojek37add7d links and events
mtojekbaf1a95 notifyEnq
mtojeka674476 findUserAdmins
mtojek96611b1 notifyUserStatusChanged
mtojekfabba3c go build
mtojeke72bf2a your and admin
mtojek80b227a tests
mtojekd27bc78 refactor
mtojeka9d8fb6 Merge branch 'main' into 17-suspended-reactivated
mtojekb789a53 247
mtojek9931bbf Danny's review
mtojekFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
NextNext commit
migrations
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit000a91778a0f570c446484ca0ddcf43d0898adeb
There are no files selected for viewing
2 changes: 2 additions & 0 deletionscoderd/database/migrations/000245_notifications_user_suspended.down.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| DELETE FROM notification_templates WHERE id = 'b02ddd82-4733-4d02-a2d7-c36f3598997d'; | ||
| DELETE FROM notification_templates WHERE id = '9f5af851-8408-4e73-a7a1-c6502ba46689'; |
18 changes: 18 additions & 0 deletionscoderd/database/migrations/000245_notifications_user_suspended.up.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| INSERT INTO notification_templates (id, name, title_template, body_template, "group", actions) | ||
| VALUES ('b02ddd82-4733-4d02-a2d7-c36f3598997d', 'User account suspended', E'User account "{{.Labels.suspended_account_name}}" suspended', | ||
| E'Hi {{.UserName}},\n\User account **{{.Labels.suspended_account_name}}** has been suspended.', | ||
| 'Workspace Events', '[ | ||
| { | ||
| "label": "View accounts", | ||
| "url": "{{ base_url }}/deployment/users?filter=status%3Aactive" | ||
| } | ||
| ]'::jsonb); | ||
| INSERT INTO notification_templates (id, name, title_template, body_template, "group", actions) | ||
| VALUES ('9f5af851-8408-4e73-a7a1-c6502ba46689', 'User account reactivated', E'User account "{{.Labels.reactivated_account_name}}" reactivated', | ||
| E'Hi {{.UserName}},\n\User account **{{.Labels.reactivated_account_name}}** has been reactivated.', | ||
| 'Workspace Events', '[ | ||
| { | ||
| "label": "View accounts", | ||
| "url": "{{ base_url }}/deployment/users?filter=status%3Aactive" | ||
| } | ||
| ]'::jsonb); |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.