chore(dashboard): mismatch in dashboard lock rbac (#8137)

This commit is contained in:
Vikrant Gupta 2025-06-03 20:06:38 +05:30 committed by GitHub
parent 7955497a8d
commit ad2d4ed56c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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