From ad2d4ed56cf8457a0feee2b6947aed95c355c957 Mon Sep 17 00:00:00 2001 From: Vikrant Gupta Date: Tue, 3 Jun 2025 20:06:38 +0530 Subject: [PATCH] chore(dashboard): mismatch in dashboard lock rbac (#8137) --- pkg/types/dashboardtypes/dashboard.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/types/dashboardtypes/dashboard.go b/pkg/types/dashboardtypes/dashboard.go index 6f967503b6..7cdd47bc42 100644 --- a/pkg/types/dashboardtypes/dashboard.go +++ b/pkg/types/dashboardtypes/dashboard.go @@ -214,7 +214,7 @@ func (dashboard *Dashboard) CanLockUnlock(ctx context.Context, updatedBy string) return err } - if dashboard.CreatedBy != updatedBy || claims.Role != types.RoleAdmin { + if dashboard.CreatedBy != updatedBy && claims.Role != types.RoleAdmin { return errors.Newf(errors.TypeForbidden, errors.CodeForbidden, "you are not authorized to lock/unlock this dashboard") } return nil