Skip to content

Commit

Permalink
Update Bolt DB checkOwner: shortcut if owner-check is not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtamm committed Jan 27, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent c12d92d commit 85dc91b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/boltdb/tes.go
Original file line number Diff line number Diff line change
@@ -234,7 +234,7 @@ func (taskBolt *BoltDB) ListTasks(ctx context.Context, req *tes.ListTasksRequest

func checkOwner(tx *bolt.Tx, taskId string, ctx context.Context) error {
// Skip access-check for system-related operations where ctx is undefined:
if ctx == nil {
if ctx == nil || server.GetUser(ctx).CanSeeAllTasks() {
return nil
}

0 comments on commit 85dc91b

Please sign in to comment.