[feature] Admin accounts endpoints; approve/reject sign-ups (#2826)

* update settings panels, add pending overview + approve/deny functions

* add admin accounts get, approve, reject

* send approved/rejected emails

* use signup URL

* docs!

* email

* swagger

* web linting

* fix email tests

* wee lil fixerinos

* use new paging logic for GetAccounts() series of admin endpoints, small changes to query building

* shuffle useAccountIDIn check *before* adding to query

* fix parse from toot react error

* use `netip.Addr`

* put valid slices in globals

* optimistic updates for account state

---------

Co-authored-by: kim <grufwub@gmail.com>
This commit is contained in:
tobi
2024-04-13 13:25:10 +02:00
committed by GitHub
parent 1439042104
commit 89e0cfd874
74 changed files with 4102 additions and 545 deletions

View File

@@ -53,6 +53,14 @@ type Sender interface {
// It is expected that the toAddresses have already been filtered to ensure
// that they all belong to active admins + moderators.
SendNewSignupEmail(toAddress []string, data NewSignupData) error
// SendSignupApprovedEmail sends an email to the given address
// that their sign-up request has been approved by a moderator.
SendSignupApprovedEmail(toAddress string, data SignupApprovedData) error
// SendSignupRejectedEmail sends an email to the given address
// that their sign-up request has been rejected by a moderator.
SendSignupRejectedEmail(toAddress string, data SignupRejectedData) error
}
// NewSender returns a new email Sender interface with the given configuration, or an error if something goes wrong.