mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Zanzana: Use correct namespace when evaluating permission (#96258)
Use correct namespace
This commit is contained in:
parent
7812cb83e9
commit
db6422c8a3
@ -8,8 +8,6 @@ import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"go.opentelemetry.io/otel"
|
||||
|
||||
"github.com/grafana/authlib/claims"
|
||||
|
||||
"github.com/grafana/grafana/pkg/apimachinery/identity"
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
"github.com/grafana/grafana/pkg/infra/metrics"
|
||||
@ -133,8 +131,7 @@ func (a *AccessControl) evaluateZanzana(ctx context.Context, user identity.Reque
|
||||
_, _, parentFolder = accesscontrol.SplitScope(scopes[1])
|
||||
}
|
||||
|
||||
namespace := claims.OrgNamespaceFormatter(user.GetOrgID())
|
||||
req, ok := zanzana.TranslateToCheckRequest(namespace, action, kind, parentFolder, identifier)
|
||||
req, ok := zanzana.TranslateToCheckRequest(user.GetNamespace(), action, kind, parentFolder, identifier)
|
||||
if !ok {
|
||||
// unsupported translation
|
||||
return false, errAccessNotImplemented
|
||||
|
Loading…
Reference in New Issue
Block a user