// Initial User Creation via CLI only
Initial User Creation via CLI only
// Initial User Creation via CLI only
func (ad *SysAccountRepo) InitSuperUser(in *SuperAccountRequest) error {
	if in == nil {
		return fmt.Errorf("error unable to proceed, user is nil")
	}
	newAcc := &pkg.Account{
		Id:        sharedConfig.NewID(),
		Email:     in.Email,
		Password:  in.Password,
		Role:      &pkg.UserRoles{Role: pkg.SUPERADMIN, All: true},
		CreatedAt: timestampNow(),
		UpdatedAt: timestampNow(),
		Disabled:  false,
		Verified:  true,
	}
	_, err := ad.store.InsertFromPkgAccountRequest(newAcc)
	if err != nil {
		ad.log.Debugf("error unable to create super-account request: %v", err)
		return err
	}
	return nil
}
func ( ad * SysAccountRepo ) InitSuperUser ( in * SuperAccountRequest ) error { if in == nil { return fmt . Errorf ( " " ) } newAcc := & pkg . Account { Id : sharedConfig . NewID ( ) , Email : in . Email , Password : in . Password , Role : & pkg . UserRoles { Role : pkg . SUPERADMIN , All : true } , CreatedAt : timestampNow ( ) , UpdatedAt : timestampNow ( ) , Disabled : false , Verified : true , } _ , err := ad . store . InsertFromPkgAccountRequest ( newAcc ) if err != nil { ad . log . Debugf ( " " , err ) return err } return nil }
Initial User Creation via CLI only
Initial User Creation via CLI only