mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-17 06:25:52 +08:00
chore(dashboard): mismatch in dashboard lock rbac (#8137)
This commit is contained in:
parent
7955497a8d
commit
ad2d4ed56c
@ -214,7 +214,7 @@ func (dashboard *Dashboard) CanLockUnlock(ctx context.Context, updatedBy string)
|
|||||||
return err
|
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 errors.Newf(errors.TypeForbidden, errors.CodeForbidden, "you are not authorized to lock/unlock this dashboard")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user