IAM: remove duplicated functions (#96989)

* Remove duplicated function and use the one provided by claims package
This commit is contained in:
Karl Persson
2024-11-26 09:22:45 +01:00
committed by GitHub
parent 3dbd3a7a81
commit 3990637af9
20 changed files with 37 additions and 74 deletions
@@ -10,7 +10,6 @@ import (
"github.com/stretchr/testify/require"
"github.com/grafana/authlib/claims"
"github.com/grafana/grafana/pkg/apimachinery/identity"
"github.com/grafana/grafana/pkg/infra/db"
"github.com/grafana/grafana/pkg/infra/localcache"
"github.com/grafana/grafana/pkg/infra/tracing"
@@ -626,7 +625,7 @@ func TestIntegrationAccessControlStore_SearchUsersPermissions(t *testing.T) {
},
options: accesscontrol.SearchOptions{
ActionPrefix: "teams:",
TypedID: identity.NewTypedID(claims.TypeUser, 1),
TypedID: claims.NewTypeID(claims.TypeUser, "1"),
},
wantPerm: map[int64][]accesscontrol.Permission{
1: {{Action: "teams:read", Scope: "teams:id:1"}, {Action: "teams:read", Scope: "teams:id:10"},