From ecee5b4dee6720eff843afecf002415ca47eac97 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Fri, 17 Jan 2025 11:35:20 +0300 Subject: [PATCH] remove code that reset the admin flag based on the adminstore --- handlers/application/menuhandler.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/handlers/application/menuhandler.go b/handlers/application/menuhandler.go index d03d68b..45aa369 100644 --- a/handlers/application/menuhandler.go +++ b/handlers/application/menuhandler.go @@ -138,15 +138,6 @@ func (h *MenuHandlers) Init(ctx context.Context, sym string, input []byte) (reso 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 { logg.ErrorCtxf(ctx, "perister fail in handler", "state", h.st, "cache", h.ca) return r, fmt.Errorf("cannot get state and memory for handler")