summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/team.go3
-rw-r--r--api/user.go6
2 files changed, 7 insertions, 2 deletions
diff --git a/api/team.go b/api/team.go
index 35c770c20..2cc7106dc 100644
--- a/api/team.go
+++ b/api/team.go
@@ -584,6 +584,8 @@ func updateTeam(c *Context, w http.ResponseWriter, r *http.Request) {
func PermanentDeleteTeam(c *Context, team *model.Team) *model.AppError {
l4g.Warn("Attempting to permanently delete team %v id=%v", team.Name, team.Id)
+ c.Path = "/teams/permanent_delete"
+ c.LogAuditWithUserId("", fmt.Sprintf("attempt teamId=%v", team.Id))
team.DeleteAt = model.GetMillis()
if result := <-Srv.Store.Team().Update(team); result.Err != nil {
@@ -608,6 +610,7 @@ func PermanentDeleteTeam(c *Context, team *model.Team) *model.AppError {
}
l4g.Warn("Permanently deleted team %v id=%v", team.Name, team.Id)
+ c.LogAuditWithUserId("", fmt.Sprintf("success teamId=%v", team.Id))
return nil
}
diff --git a/api/user.go b/api/user.go
index c9aa897ed..3281e83e2 100644
--- a/api/user.go
+++ b/api/user.go
@@ -1230,8 +1230,9 @@ func UpdateActive(c *Context, user *model.User, active bool) *model.User {
func PermanentDeleteUser(c *Context, user *model.User) *model.AppError {
l4g.Warn("Attempting to permanently delete account %v id=%v", user.Email, user.Id)
- c.Path = "/user/permanent_delete"
- c.LogAuditWithUserId(user.Id, fmt.Sprintf("attempt"))
+ c.Path = "/users/permanent_delete"
+ c.LogAuditWithUserId(user.Id, fmt.Sprintf("attempt userId=%v", user.Id))
+ c.LogAuditWithUserId("", fmt.Sprintf("attempt userId=%v", user.Id))
if user.IsInRole(model.ROLE_SYSTEM_ADMIN) {
l4g.Warn("You are deleting %v that is a system administrator. You may need to set another account as the system administrator using the command line tools.", user.Email)
}
@@ -1275,6 +1276,7 @@ func PermanentDeleteUser(c *Context, user *model.User) *model.AppError {
}
l4g.Warn("Permanently deleted account %v id=%v", user.Email, user.Id)
+ c.LogAuditWithUserId("", fmt.Sprintf("success userId=%v", user.Id))
return nil
}