fix: login (#242)

* password in init user only if needed

* reactivate user session

* set context AuthorizeClientIDSecret

* fix qr code for light

* fix copy

* check user and org active in auth

* add org view provider

* handle inactive projects

* translate error messages
This commit is contained in:
Livio Amstutz
2020-06-19 14:52:04 +02:00
committed by GitHub
parent fb89241984
commit e653eaab86
26 changed files with 327 additions and 83 deletions

View File

@@ -153,5 +153,7 @@ Errors:
NotExisting: Multifaktor OTP (OneTimePassword) existiert nicht
InvalidCode: Code ist ungültig
NotReady: Multifaktor OTP (OneTimePassword) ist nicht bereit
Locked: Benutzer ist gesperrt
NotActive: Benutzer ist nicht aktiv
optional: (optional)

View File

@@ -154,6 +154,8 @@ Errors:
NotExisting: Multifactor OTP (OneTimePassword) doesn't exist
InvalidCode: Invalid code
NotReady: Multifactor OTP (OneTimePassword) isn't ready
Locked: User is locked
NotActive: User is not active
optional: (optional)

View File

@@ -3,4 +3,4 @@ const copyToClipboard = str => {
}
let copyButton = document.getElementsByClassName("copy")[0];
copyButton.addEventListener("click", copyToClipboard(copyButton.getAttribute("data-copy").value));
copyButton.addEventListener("click", copyToClipboard(copyButton.getAttribute("data-copy")));

View File

@@ -68,12 +68,12 @@ html {
}
#qrcode {
svg rect[style*="fill:white"] {
fill: $backgroundColorLight !important;
svg rect.color {
fill: $fontColorLight;
}
svg rect[style*="fill:black"] {
fill: $fontColorLight !important;
svg rect.bg-color {
fill: $backgroundColorLight;
}
}

View File

@@ -10,12 +10,14 @@
<input type="hidden" name="authRequestID" value="{{ .AuthReqID }}" />
<input type="hidden" name="userID" value="{{ .UserID }}" />
<input type="hidden" name="passwordSet" value="{{ .PasswordSet }}" />
<div class="fields">
<div class="field">
<label class="label" for="code">{{t "InitUser.Code"}}</label>
<input class="input" type="text" id="code" name="code" value="{{.Code}}" autocomplete="off" autofocus required>
</div>
{{ if not .PasswordSet }}
<div class="field">
<label class="label" for="password">{{t "InitUser.NewPassword"}}</label>
<input class="input" type="password" id="password" name="password" autocomplete="new-password" autofocus required>
@@ -24,12 +26,13 @@
<label class="label" for="passwordconfirm">{{t "InitUser.NewPasswordConfirm"}}</label>
<input class="input" type="password" id="passwordconfirm" name="passwordconfirm" autocomplete="new-password" autofocus required>
</div>
{{ end }}
</div>
{{ template "error-message" .}}
<div class="actions">
<button type="submit" name="resend" value="false" class="primary right" >{{t "Actions.Next"}}</buttontype="submit">
<button type="submit" name="resend" value="false" class="primary right" >{{t "Actions.Next"}}</button>
<button type="submit" name="resend" value="true" class="secondary right" formnovalidate>{{t "Actions.Resend" }}</button>
</div>
</form>