From 83716705128ebd0682d1f8e05ae16cf577929b20 Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Fri, 3 Nov 2023 15:45:45 +0530 Subject: [PATCH] chore: dashboard locking ee query-service (#3890) --- ee/query-service/app/api/dashboard.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/query-service/app/api/dashboard.go b/ee/query-service/app/api/dashboard.go index abd1aed3f4..83c82a1477 100644 --- a/ee/query-service/app/api/dashboard.go +++ b/ee/query-service/app/api/dashboard.go @@ -35,7 +35,7 @@ func (ah *APIHandler) lockUnlockDashboard(w http.ResponseWriter, r *http.Request } user := common.GetUserFromContext(r.Context()) - if !auth.IsAdmin(user) || (dashboard.CreateBy != nil && *dashboard.CreateBy != user.Email) { + if !auth.IsAdmin(user) && (dashboard.CreateBy != nil && *dashboard.CreateBy != user.Email) { RespondError(w, &model.ApiError{Typ: model.ErrorForbidden, Err: err}, "You are not authorized to lock/unlock this dashboard") return }