Service Accounts: Managed permissions for service accounts (#51818)

* backend changes

* frontend changes

* linting

* nit

* import order

* allow SA creator to access the SA page

* fix merge

* tests

* fix frontend tests

Co-authored-by: alexanderzobnin alexanderzobnin@gmail.com
This commit is contained in:
Ieva
2022-07-08 05:53:18 -04:00
committed by GitHub
co-authored by alexanderzobnin alexanderzobnin@gmail.com
parent 2af5feb147
commit d85df0a560
22 changed files with 256 additions and 79 deletions
@@ -23,7 +23,7 @@ type ServiceAccountsStoreImpl struct {
log log.Logger
}
func NewServiceAccountsStore(store *sqlstore.SQLStore, kvStore kvstore.KVStore) *ServiceAccountsStoreImpl {
func ProvideServiceAccountsStore(store *sqlstore.SQLStore, kvStore kvstore.KVStore) *ServiceAccountsStoreImpl {
return &ServiceAccountsStoreImpl{
sqlStore: store,
kvStore: kvStore,
@@ -105,7 +105,7 @@ func setupTestDatabase(t *testing.T) (*sqlstore.SQLStore, *ServiceAccountsStoreI
t.Helper()
db := sqlstore.InitTestDB(t)
kvStore := kvstore.ProvideService(db)
return db, NewServiceAccountsStore(db, kvStore)
return db, ProvideServiceAccountsStore(db, kvStore)
}
func TestStore_RetrieveServiceAccount(t *testing.T) {