working commit
This commit is contained in:
+4
-4
@@ -26,7 +26,7 @@ func (db *Database) WriteAnonymous(ctx context.Context) error {
|
||||
password := auxtool.RandomString(64)
|
||||
passhash := auxpwd.MakeSHA256Hash([]byte(password))
|
||||
accountDescr := &descr.Account{
|
||||
ID: auxuuid.NewUUID(),
|
||||
ID: descr.AnonymousID,
|
||||
Username: descr.AnonimousUsername,
|
||||
Passhash: passhash,
|
||||
Disabled: false,
|
||||
@@ -56,7 +56,7 @@ func (db *Database) WriteAnonymous(ctx context.Context) error {
|
||||
grantDescr = &descr.Grant{
|
||||
ID: auxuuid.NewUUID(),
|
||||
AccountID: accountDescr.ID,
|
||||
Right: descr.RightReadFiles,
|
||||
Right: descr.RightReadImages,
|
||||
Pattern: "*",
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
@@ -78,8 +78,8 @@ func (db *Database) WriteInituser(ctx context.Context) error {
|
||||
now := auxtool.TimeNow()
|
||||
passhash := auxpwd.MakeSHA256Hash([]byte(descr.InitUsername))
|
||||
accountDescr := &descr.Account{
|
||||
ID: auxuuid.NewUUID(),
|
||||
Username: descr.AnonimousUsername,
|
||||
ID: descr.InitID,
|
||||
Username: descr.InitUsername,
|
||||
Passhash: passhash,
|
||||
Disabled: false,
|
||||
CreatedAt: now,
|
||||
|
||||
Reference in New Issue
Block a user