grafana/pkg/services/ngalert/tests/fakes/permissions.go
Matthew Jacobson 6652233493
Alerting: Managed receiver resource permission in receiver_svc (#93556)
* Alerting: Managed receiver resource permission in receiver_svc
2024-09-23 21:12:25 +03:00

29 lines
872 B
Go

package fakes
import (
"context"
"github.com/grafana/grafana/pkg/apimachinery/identity"
"github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/accesscontrol/actest"
)
type FakeReceiverPermissionsService struct {
*actest.FakePermissionsService
}
func NewFakeReceiverPermissionsService() *FakeReceiverPermissionsService {
return &FakeReceiverPermissionsService{
FakePermissionsService: &actest.FakePermissionsService{},
}
}
func (f FakeReceiverPermissionsService) SetDefaultPermissions(ctx context.Context, orgID int64, user identity.Requester, uid string) {
}
func (f FakeReceiverPermissionsService) CopyPermissions(ctx context.Context, orgID int64, user identity.Requester, oldUID, newUID string) (int, error) {
return 0, nil
}
var _ accesscontrol.ReceiverPermissionsService = new(FakeReceiverPermissionsService)