working commit

This commit is contained in:
2026-06-05 18:35:25 +02:00
parent 16c52424ed
commit 557aea269d
13 changed files with 82 additions and 73 deletions
+5 -5
View File
@@ -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,