diff options
author | qwerty287 <80460567+qwerty287@users.noreply.github.com> | 2021-11-16 20:13:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-16 19:13:13 +0000 |
commit | 3be156f66a9682d698fe1191a7dd1016270873ab (patch) | |
tree | 55a17870cdfe1fa037a9b2d42836f1ae871debda /routers/web/web.go | |
parent | bbffcc3aecda040a40d49078e7141213bc8d78af (diff) | |
download | gitea-3be156f66a9682d698fe1191a7dd1016270873ab.tar.gz gitea-3be156f66a9682d698fe1191a7dd1016270873ab.zip |
Allow admins to change user avatars (#17661)
Adds the avatar change panel to the edit user page (bottom) and allows admins to change it this way
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'routers/web/web.go')
-rw-r--r-- | routers/web/web.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/web/web.go b/routers/web/web.go index a20bf484b3..132e649d45 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -408,6 +408,8 @@ func RegisterRoutes(m *web.Route) { m.Combo("/new").Get(admin.NewUser).Post(bindIgnErr(forms.AdminCreateUserForm{}), admin.NewUserPost) m.Combo("/{userid}").Get(admin.EditUser).Post(bindIgnErr(forms.AdminEditUserForm{}), admin.EditUserPost) m.Post("/{userid}/delete", admin.DeleteUser) + m.Post("/{userid}/avatar", bindIgnErr(forms.AvatarForm{}), admin.AvatarPost) + m.Post("/{userid}/avatar/delete", admin.DeleteAvatar) }) m.Group("/emails", func() { |