Public rank change log: sa_rank_log, written on rank changes, listed on the Staff page
This commit is contained in:
parent
861692c534
commit
611b79cdba
11 changed files with 346 additions and 17 deletions
|
|
@ -517,7 +517,7 @@ func (s *Server) deleteGroup(w http.ResponseWriter, r *http.Request, id *Identit
|
|||
fail(w, http.StatusForbidden, "You can't delete your own rank.")
|
||||
return
|
||||
}
|
||||
if err := s.st.DeleteGroup(r.Context(), g.ID); err != nil {
|
||||
if err := s.st.DeleteGroup(r.Context(), id.actor(), g.ID); err != nil {
|
||||
internal(w, r, err)
|
||||
return
|
||||
}
|
||||
|
|
@ -576,7 +576,7 @@ func (s *Server) applyRank(w http.ResponseWriter, r *http.Request, id *Identity,
|
|||
if name == "" {
|
||||
name = req.SteamID
|
||||
}
|
||||
if err := s.st.SetAdminGroup(r.Context(), req.SteamID, name, req.Group, grp.Immunity, ends); err != nil {
|
||||
if err := s.st.SetAdminGroup(r.Context(), id.actor(), req.SteamID, name, req.Group, grp.Immunity, ends); err != nil {
|
||||
internal(w, r, err)
|
||||
return
|
||||
}
|
||||
|
|
@ -618,7 +618,7 @@ func (s *Server) removeStaff(w http.ResponseWriter, r *http.Request, id *Identit
|
|||
if !s.checkStaffTarget(w, id, x, steamid) {
|
||||
return
|
||||
}
|
||||
if err := s.st.RemoveAdmin(r.Context(), steamid); err != nil {
|
||||
if err := s.st.RemoveAdmin(r.Context(), id.actor(), steamid); err != nil {
|
||||
internal(w, r, err)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue