mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Serviceaccounts: feat - tabview for serviceaccounts (#43573)
This commit is contained in:
@@ -61,3 +61,9 @@ func (sa *ServiceAccountsService) DeleteServiceAccount(ctx context.Context, orgI
|
||||
}
|
||||
return sa.store.DeleteServiceAccount(ctx, orgID, serviceAccountID)
|
||||
}
|
||||
|
||||
func (sa *ServiceAccountsService) Migrated(ctx context.Context, orgID int64) bool {
|
||||
// TODO: implement migration logic
|
||||
// change this to return true for development of service accounts page
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -9,7 +9,9 @@ import (
|
||||
type Service interface {
|
||||
CreateServiceAccount(ctx context.Context, saForm *CreateServiceaccountForm) (*models.User, error)
|
||||
DeleteServiceAccount(ctx context.Context, orgID, serviceAccountID int64) error
|
||||
Migrated(ctx context.Context, orgID int64) bool
|
||||
}
|
||||
|
||||
type Store interface {
|
||||
CreateServiceAccount(ctx context.Context, saForm *CreateServiceaccountForm) (*models.User, error)
|
||||
DeleteServiceAccount(ctx context.Context, orgID, serviceAccountID int64) error
|
||||
|
||||
@@ -37,6 +37,10 @@ func (s *ServiceAccountMock) DeleteServiceAccount(ctx context.Context, orgID, se
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *ServiceAccountMock) Migrated(ctx context.Context, orgID int64) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func SetupMockAccesscontrol(t *testing.T, userpermissionsfunc func(c context.Context, siu *models.SignedInUser) ([]*accesscontrol.Permission, error), disableAccessControl bool) *accesscontrolmock.Mock {
|
||||
t.Helper()
|
||||
acmock := accesscontrolmock.New()
|
||||
|
||||
Reference in New Issue
Block a user