Merge branch 'ft/app'

This commit is contained in:
itsscb 2023-12-01 00:23:46 +01:00
commit 55a8590957
4 changed files with 29 additions and 8 deletions

11
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,11 @@
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Test Building..'
}
}
}
}

View File

@ -50,7 +50,7 @@ func (server *Server) ResendVerification(ctx context.Context, req *pb.ResendVeri
ID: req.GetAccountId(), ID: req.GetAccountId(),
}, },
AfterCreate: func(a db.Account) error { AfterCreate: func(a db.Account) error {
return server.mailSender.SendEmail("Verify your E-Mail Address", fmt.Sprintf("Hello %s,</br></br>please verify your E-Mail Addres by clicking on the following link:</br><a href=\"%s/v1/verify_email/%d/%s\">Verification Link</a></br></br></br>Your Team of DF", account.Email, server.config.Url, a.ID, a.SecretKey.String), []string{account.Email}, nil, nil, nil) return server.mailSender.SendEmail("Verify your E-Mail Address", fmt.Sprintf("Hello %s,</br></br>please verify your E-Mail Addres by clicking on the following link:</br><a href=\"https://df.itsscb.de/v1/verify_email/%d/%s\">Verification Link</a></br></br></br>Your Team of DF", account.Email, a.ID, a.SecretKey.String), []string{account.Email}, nil, nil, nil)
}, },
} }

View File

@ -21,6 +21,7 @@ type Config struct {
SMTPPassword string `mapstructure:"SMTP_PASSWORD"` SMTPPassword string `mapstructure:"SMTP_PASSWORD"`
SMTPMail string `mapstructure:"SMTP_MAIL"` SMTPMail string `mapstructure:"SMTP_MAIL"`
MigrationRetries int `mapstructure:"MIGRATION_RETRIES"` MigrationRetries int `mapstructure:"MIGRATION_RETRIES"`
Swagger bool `mapstructure:"SWAGGER"`
AccessTokenDuration time.Duration `mapstructure:"ACCESS_TOKEN_DURATION"` AccessTokenDuration time.Duration `mapstructure:"ACCESS_TOKEN_DURATION"`
RefreshTokenDuration time.Duration `mapstructure:"REFRESH_TOKEN_DURATION"` RefreshTokenDuration time.Duration `mapstructure:"REFRESH_TOKEN_DURATION"`
} }

View File

@ -88,16 +88,25 @@ class _DigitalerFriedenState extends State<DigitalerFrieden> {
accountLevel = await _storageService.accountLevel; accountLevel = await _storageService.accountLevel;
accessToken = await _storageService.accessToken; accessToken = await _storageService.accessToken;
verified = await _storageService.verified; verified = await _storageService.verified;
if (accountLevel! > 1) {
authenticated = await AuthService.authenticateWithBiometrics(); if (accessToken != null) {
}
if (authenticated && accountLevel != null && accountLevel! > 3) {
account = await _vm.account; account = await _vm.account;
} }
if (account != null && !verified && account!.emailVerified) { if (account != null) {
await _storageService.setVerified(account!.emailVerified); if (verified != account!.emailVerified) {
verified = account!.emailVerified; verified = account!.emailVerified;
_storageService.setVerified(verified);
}
if (accountLevel == null || account!.accountLevel > accountLevel!) {
accountLevel = account!.accountLevel;
_storageService.setAccountLevel(account!.accountLevel);
}
}
if (accountLevel! > 1) {
authenticated = await AuthService.authenticateWithBiometrics();
} }
print( print(