working commit
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"mbase/app/descriptor"
|
||||
"mbase/app/descr"
|
||||
"mbase/pkg/auxid"
|
||||
"mbase/pkg/auxpwd"
|
||||
)
|
||||
@@ -34,7 +34,7 @@ func (lg *Logic) SeedAccount(ctx context.Context) (int64, error) {
|
||||
if len(accountDescrs) == 0 {
|
||||
now := time.Now().Format(time.RFC3339)
|
||||
passhash := auxpwd.MakeSHA256Hash([]byte(defaultSeedPassword))
|
||||
accountDescr := &descriptor.Account{
|
||||
accountDescr := &descr.Account{
|
||||
ID: auxid.GenID(),
|
||||
Username: defaultSeedUsername,
|
||||
Passhash: passhash,
|
||||
@@ -48,11 +48,11 @@ func (lg *Logic) SeedAccount(ctx context.Context) (int64, error) {
|
||||
}
|
||||
accountID = accountDescr.ID
|
||||
grantTypes := []string{
|
||||
descriptor.GrantModifyUsers,
|
||||
descriptor.GrantModifyDatabase,
|
||||
descr.GrantModifyUsers,
|
||||
descr.GrantModifyDatabase,
|
||||
}
|
||||
for _, grantType := range grantTypes {
|
||||
grantDescr := &descriptor.Grant{
|
||||
grantDescr := &descr.Grant{
|
||||
AccountID: accountDescr.ID,
|
||||
Operation: grantType,
|
||||
CreatedAt: now,
|
||||
|
||||
Reference in New Issue
Block a user