mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 18:30:41 -06:00
6652233493
* Alerting: Managed receiver resource permission in receiver_svc
29 lines
872 B
Go
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)
|