AccessControl: Read team permissions from db (#44727)

This commit is contained in:
Gabriel MABILLE 2022-02-01 18:35:31 +01:00 committed by GitHub
parent 55a9c98ae3
commit f81b9c8150
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,7 @@ import (
"github.com/grafana/grafana/pkg/infra/usagestats"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/accesscontrol/resourceservices"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/prometheus/client_golang/prometheus"
)
@ -105,7 +106,7 @@ func (ac *OSSAccessControlService) GetUserPermissions(ctx context.Context, user
OrgID: user.OrgId,
UserID: user.UserId,
Roles: ac.GetUserBuiltInRoles(user),
Actions: []string{},
Actions: resourceservices.TeamAdminActions,
})
if err != nil {
return nil, err