RBAC: remove dead code (#97234)

This code is unused and always have been
This commit is contained in:
Karl Persson
2024-12-02 16:23:51 +01:00
committed by GitHub
parent 66c0322e7e
commit e4fbae03a1
2 changed files with 0 additions and 160 deletions
@@ -3,7 +3,6 @@ package database_test
import (
"context"
"fmt"
"strings"
"testing"
"github.com/stretchr/testify/assert"
@@ -147,17 +146,6 @@ func TestAccessControlStore_GetUserPermissions(t *testing.T) {
require.NoError(t, err)
assert.Len(t, permissions, tt.expected)
policies, err := database.GetAccessPolicies(context.Background(), user.OrgID, sql.GetSqlxSession(),
func(ctx context.Context, orgID int64, scope string) ([]string, error) {
return strings.Split(scope, ":"), nil
})
require.NoError(t, err)
assert.Len(t, policies, tt.policyCount)
for idx, p := range policies {
fmt.Printf("POLICIES[%d] %+v\n", idx, p.Spec)
}
})
}
}