DS proxy: Remove ft datasourceProxyDisableRBAC and logic (#101239)

delete ft datasourceproxy
This commit is contained in:
Eric Leijonmarck
2025-02-25 17:30:58 +00:00
committed by GitHub
parent 142a100915
commit 4538c8cad9
6 changed files with 3 additions and 24 deletions
+2 -10
View File
@@ -306,16 +306,8 @@ func (proxy *DataSourceProxy) validateRequest() error {
continue
}
if proxy.features.IsEnabled(proxy.ctx.Req.Context(), featuremgmt.FlagDatasourceProxyDisableRBAC) {
// TODO(aarongodin): following logic can be removed with FlagDatasourceProxyDisableRBAC as it is covered by
// proxy.hasAccessToRoute(..)
if route.ReqRole.IsValid() && !proxy.ctx.HasUserRole(route.ReqRole) {
return errors.New("plugin proxy route access denied")
}
} else {
if !proxy.hasAccessToRoute(route) {
return errors.New("plugin proxy route access denied")
}
if !proxy.hasAccessToRoute(route) {
return errors.New("plugin proxy route access denied")
}
proxy.matchedRoute = route