AC: Remove legacy AC from dashboard permissions API (#71524)
* remove IsDisabled from org API * remove IsDisabled from dashboard_permissions API
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
||||
"github.com/grafana/grafana/pkg/infra/metrics"
|
||||
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
|
||||
"github.com/grafana/grafana/pkg/services/org"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/grafana/grafana/pkg/util"
|
||||
"github.com/grafana/grafana/pkg/web"
|
||||
)
|
||||
@@ -131,10 +130,6 @@ func (hs *HTTPServer) CreateOrg(c *contextmodel.ReqContext) response.Response {
|
||||
if err := web.Bind(c.Req, &cmd); err != nil {
|
||||
return response.Error(http.StatusBadRequest, "bad request data", err)
|
||||
}
|
||||
acEnabled := !hs.AccessControl.IsDisabled()
|
||||
if !acEnabled && !(setting.AllowUserOrgCreate || c.IsGrafanaAdmin) {
|
||||
return response.Error(http.StatusForbidden, "Access denied", nil)
|
||||
}
|
||||
|
||||
cmd.UserID = c.UserID
|
||||
result, err := hs.orgService.CreateWithMember(c.Req.Context(), &cmd)
|
||||
|
||||
Reference in New Issue
Block a user