remove code that reset the admin flag based on the adminstore

This commit is contained in:
Alfred Kamanda 2025-01-17 11:35:20 +03:00
parent 879baa03fc
commit ecee5b4dee
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -138,15 +138,6 @@ func (h *MenuHandlers) Init(ctx context.Context, sym string, input []byte) (reso
ctx = context.WithValue(ctx, "SessionId", sessionId) ctx = context.WithValue(ctx, "SessionId", sessionId)
} }
flag_admin_privilege, _ := h.flagManager.GetFlag("flag_admin_privilege")
isAdmin, _ := h.adminstore.IsAdmin(sessionId)
if isAdmin {
r.FlagSet = append(r.FlagSet, flag_admin_privilege)
} else {
r.FlagReset = append(r.FlagReset, flag_admin_privilege)
}
if h.st == nil || h.ca == nil { if h.st == nil || h.ca == nil {
logg.ErrorCtxf(ctx, "perister fail in handler", "state", h.st, "cache", h.ca) logg.ErrorCtxf(ctx, "perister fail in handler", "state", h.st, "cache", h.ca)
return r, fmt.Errorf("cannot get state and memory for handler") return r, fmt.Errorf("cannot get state and memory for handler")