[MM-25646] Adds the permanent delete all users endpoint to the local API (#14903)
* [MM-25646] Adds the permanent delete all users endpoint to the local API * Add a check to ensure that teams and channels are not deleted * Fix linter * Fix audit record name for consistency with method name Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
48ed86ddc7
Коммит
eff2209a7e
@@ -1211,6 +1211,16 @@ func (c *Client4) DeleteUser(userId string) (bool, *Response) {
|
||||
return CheckStatusOK(r), BuildResponse(r)
|
||||
}
|
||||
|
||||
// PermanentDeleteAll permanently deletes all users in the system. This is a local only endpoint
|
||||
func (c *Client4) PermanentDeleteAllUsers() (bool, *Response) {
|
||||
r, err := c.DoApiDelete(c.GetUsersRoute())
|
||||
if err != nil {
|
||||
return false, BuildErrorResponse(r, err)
|
||||
}
|
||||
defer closeBody(r)
|
||||
return CheckStatusOK(r), BuildResponse(r)
|
||||
}
|
||||
|
||||
// SendPasswordResetEmail will send a link for password resetting to a user with the
|
||||
// provided email.
|
||||
func (c *Client4) SendPasswordResetEmail(email string) (bool, *Response) {
|
||||
|
||||
Ссылка в новой задаче
Block a user