mirror of
https://github.com/zitadel/zitadel.git
synced 2025-03-01 15:27:25 +00:00
Merge remote-tracking branch 'origin/main' into next-rc
This commit is contained in:
commit
406fa44b63
@ -34,7 +34,7 @@
|
||||
<button mat-stroked-button type="button" (click)="reset()">{{ 'ACTIONS.RESET' | translate }}</button>
|
||||
<span class="filter-middle">{{ 'FILTER.TITLE' | translate }}</span>
|
||||
<button mat-raised-button color="primary" type="button" (click)="finish()" data-e2e="filter-finish-button">
|
||||
{{ 'ACTIONS.FINISH' | translate }}
|
||||
{{ 'ACTIONS.APPLY' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
<form *ngIf="form" [formGroup]="form" (ngSubmit)="emitChange()">
|
||||
|
@ -23,7 +23,7 @@
|
||||
<div class="filter-top">
|
||||
<button mat-stroked-button (click)="resetted.emit()">{{ 'ACTIONS.RESET' | translate }}</button>
|
||||
<span class="filter-middle">{{ 'FILTER.TITLE' | translate }}</span>
|
||||
<button mat-raised-button color="primary" (click)="emitFilter()">{{ 'ACTIONS.FINISH' | translate }}</button>
|
||||
<button mat-raised-button color="primary" (click)="emitFilter()">{{ 'ACTIONS.APPLY' | translate }}</button>
|
||||
</div>
|
||||
<ng-content></ng-content>
|
||||
</div>
|
||||
|
@ -53,6 +53,10 @@
|
||||
overflow: hidden; // prevents multi-line errors from overlapping the control
|
||||
}
|
||||
|
||||
mat-dialog-container .cnsl-form-field-subscript-wrapper {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.cnsl-form-field-hint-wrapper,
|
||||
.cnsl-form-field-error-wrapper {
|
||||
display: flex;
|
||||
|
@ -1,4 +1,4 @@
|
||||
<h1 class="title">
|
||||
<h1 mat-dialog-title class="title">
|
||||
<span>{{ data.title | translate }}</span>
|
||||
</h1>
|
||||
<div mat-dialog-content>
|
||||
|
@ -96,7 +96,10 @@ export class UserTableComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
this.route.queryParams.pipe(take(1)).subscribe((params) => {
|
||||
this.getData(this.INITIAL_PAGE_SIZE, 0, this.type);
|
||||
if (!params['filter']) {
|
||||
this.getData(this.INITIAL_PAGE_SIZE, 0, this.type, this.searchQueries);
|
||||
}
|
||||
|
||||
if (params['deferredReload']) {
|
||||
setTimeout(() => {
|
||||
this.getData(this.paginator.pageSize, this.paginator.pageIndex * this.paginator.pageSize, this.type);
|
||||
@ -116,7 +119,7 @@ export class UserTableComponent implements OnInit {
|
||||
queryParamsHandling: 'merge',
|
||||
skipLocationChange: false,
|
||||
});
|
||||
this.getData(this.paginator.pageSize, this.paginator.pageIndex * this.paginator.pageSize, this.type);
|
||||
this.getData(this.paginator.pageSize, this.paginator.pageIndex * this.paginator.pageSize, this.type, this.searchQueries);
|
||||
}
|
||||
|
||||
public isAllSelected(): boolean {
|
||||
@ -131,7 +134,7 @@ export class UserTableComponent implements OnInit {
|
||||
|
||||
public changePage(event: PageEvent): void {
|
||||
this.selection.clear();
|
||||
this.getData(event.pageSize, event.pageIndex * event.pageSize, this.type);
|
||||
this.getData(event.pageSize, event.pageIndex * event.pageSize, this.type, this.searchQueries);
|
||||
}
|
||||
|
||||
public deactivateSelectedUsers(): void {
|
||||
|
@ -497,7 +497,8 @@
|
||||
"TABLE": {
|
||||
"SHOWUSER": "Покажи потребител {{value}}"
|
||||
},
|
||||
"DOWNLOAD": "Изтегляне"
|
||||
"DOWNLOAD": "Изтегляне",
|
||||
"APPLY": "Прилагам"
|
||||
},
|
||||
"MEMBERROLES": {
|
||||
"IAM_OWNER": "Има контрол върху цялата инстанция, включително всички организации",
|
||||
|
@ -498,7 +498,8 @@
|
||||
"TABLE": {
|
||||
"SHOWUSER": "Zobrazit uživatele {{value}}"
|
||||
},
|
||||
"DOWNLOAD": "Stáhnout"
|
||||
"DOWNLOAD": "Stáhnout",
|
||||
"APPLY": "Platit"
|
||||
},
|
||||
"MEMBERROLES": {
|
||||
"IAM_OWNER": "Má kontrolu nad celou instancí, včetně všech organizací",
|
||||
|
@ -498,7 +498,8 @@
|
||||
"TABLE": {
|
||||
"SHOWUSER": "Zeige Benutzer {{value}}"
|
||||
},
|
||||
"DOWNLOAD": "Herunterladen"
|
||||
"DOWNLOAD": "Herunterladen",
|
||||
"APPLY": "Anwenden"
|
||||
},
|
||||
"MEMBERROLES": {
|
||||
"IAM_OWNER": "Hat die Kontrolle über die gesamte Instanz, einschließlich aller Organisationen",
|
||||
|
@ -498,7 +498,8 @@
|
||||
"TABLE": {
|
||||
"SHOWUSER": "Show user {{value}}"
|
||||
},
|
||||
"DOWNLOAD": "Download"
|
||||
"DOWNLOAD": "Download",
|
||||
"APPLY": "Apply"
|
||||
},
|
||||
"MEMBERROLES": {
|
||||
"IAM_OWNER": "Has control over the whole instance, including all organizations",
|
||||
|
@ -498,7 +498,8 @@
|
||||
"TABLE": {
|
||||
"SHOWUSER": "Mostrar usuario {{value}}"
|
||||
},
|
||||
"DOWNLOAD": "Descargar"
|
||||
"DOWNLOAD": "Descargar",
|
||||
"APPLY": "Aplicar"
|
||||
},
|
||||
"MEMBERROLES": {
|
||||
"IAM_OWNER": "Tiene control sobre toda la instancia, incluyendo todas las organizaciones",
|
||||
|
@ -498,7 +498,8 @@
|
||||
"TABLE": {
|
||||
"SHOWUSER": "Afficher l'utilisateur {{value}}"
|
||||
},
|
||||
"DOWNLOAD": "Télécharger"
|
||||
"DOWNLOAD": "Télécharger",
|
||||
"APPLY": "Appliquer"
|
||||
},
|
||||
"MEMBERROLES": {
|
||||
"IAM_OWNER": "A le contrôle de toute l'instance, y compris toutes les organisations",
|
||||
|
@ -497,7 +497,8 @@
|
||||
"TABLE": {
|
||||
"SHOWUSER": "Mostra utente {{value}}"
|
||||
},
|
||||
"DOWNLOAD": "Scarica"
|
||||
"DOWNLOAD": "Scarica",
|
||||
"APPLY": "Applicare"
|
||||
},
|
||||
"MEMBERROLES": {
|
||||
"IAM_OWNER": "Ha il controllo sull'intera istanza, comprese tutte le organizzazioni",
|
||||
|
@ -498,7 +498,8 @@
|
||||
"TABLE": {
|
||||
"SHOWUSER": "ユーザー {{value}} を表示する"
|
||||
},
|
||||
"DOWNLOAD": "ダウンロード"
|
||||
"DOWNLOAD": "ダウンロード",
|
||||
"APPLY": "アプライ"
|
||||
},
|
||||
"MEMBERROLES": {
|
||||
"IAM_OWNER": "すべての組織を含むインスタンス全体を管理する権限を持ちます",
|
||||
|
@ -498,7 +498,8 @@
|
||||
"TABLE": {
|
||||
"SHOWUSER": "Прикажи корисник {{value}}"
|
||||
},
|
||||
"DOWNLOAD": "Преземи"
|
||||
"DOWNLOAD": "Преземи",
|
||||
"APPLY": "Пријавете се"
|
||||
},
|
||||
"MEMBERROLES": {
|
||||
"IAM_OWNER": "Има контрола врз целата инстанца, вклучувајќи ги сите организации",
|
||||
|
@ -498,7 +498,8 @@
|
||||
"TABLE": {
|
||||
"SHOWUSER": "Toon gebruiker {{value}}"
|
||||
},
|
||||
"DOWNLOAD": "Download"
|
||||
"DOWNLOAD": "Download",
|
||||
"APPLY": "Toepassen"
|
||||
},
|
||||
"MEMBERROLES": {
|
||||
"IAM_OWNER": "Heeft controle over de hele instantie, inclusief alle organisaties",
|
||||
|
@ -497,7 +497,8 @@
|
||||
"TABLE": {
|
||||
"SHOWUSER": "Pokaż użytkownika {{value}}"
|
||||
},
|
||||
"DOWNLOAD": "Pobierz"
|
||||
"DOWNLOAD": "Pobierz",
|
||||
"APPLY": "Stosować"
|
||||
},
|
||||
"MEMBERROLES": {
|
||||
"IAM_OWNER": "Ma kontrolę nad całą instancją, włącznie z wszystkimi organizacjami",
|
||||
|
@ -498,7 +498,8 @@
|
||||
"TABLE": {
|
||||
"SHOWUSER": "Mostrar usuário {{value}}"
|
||||
},
|
||||
"DOWNLOAD": "Baixar"
|
||||
"DOWNLOAD": "Baixar",
|
||||
"APPLY": "Aplicar"
|
||||
},
|
||||
"MEMBERROLES": {
|
||||
"IAM_OWNER": "Tem controle sobre toda a instância, incluindo todas as organizações",
|
||||
|
@ -497,7 +497,8 @@
|
||||
"TABLE": {
|
||||
"SHOWUSER": "Показать пользователя {{value}}"
|
||||
},
|
||||
"DOWNLOAD": "Скачать"
|
||||
"DOWNLOAD": "Скачать",
|
||||
"APPLY": "Применять"
|
||||
},
|
||||
"MEMBERROLES": {
|
||||
"IAM_OWNER": "Имеет контроль над всем экземпляром, включая все организации",
|
||||
|
@ -498,7 +498,8 @@
|
||||
"TABLE": {
|
||||
"SHOWUSER": "Visa användare {{value}}"
|
||||
},
|
||||
"DOWNLOAD": "Ladda ner"
|
||||
"DOWNLOAD": "Ladda ner",
|
||||
"APPLY": "Tillämpa"
|
||||
},
|
||||
"MEMBERROLES": {
|
||||
"IAM_OWNER": "Har kontroll över hela instansen, inklusive alla organisationer",
|
||||
|
@ -498,7 +498,8 @@
|
||||
"TABLE": {
|
||||
"SHOWUSER": "Show user {{value}}"
|
||||
},
|
||||
"DOWNLOAD": "下载"
|
||||
"DOWNLOAD": "下载",
|
||||
"APPLY": "申请"
|
||||
},
|
||||
"MEMBERROLES": {
|
||||
"IAM_OWNER": "控制整个实例,包括所有组织",
|
||||
|
@ -3,11 +3,13 @@ package ldap
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"net"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/go-ldap/ldap/v3"
|
||||
"github.com/zitadel/logging"
|
||||
@ -262,12 +264,12 @@ func mapLDAPEntryToUser(
|
||||
}
|
||||
|
||||
return NewUser(
|
||||
user.GetAttributeValue(idAttribute),
|
||||
user.GetAttributeValue(firstNameAttribute),
|
||||
user.GetAttributeValue(lastNameAttribute),
|
||||
user.GetAttributeValue(displayNameAttribute),
|
||||
user.GetAttributeValue(nickNameAttribute),
|
||||
user.GetAttributeValue(preferredUsernameAttribute),
|
||||
getAttributeValue(user, idAttribute),
|
||||
getAttributeValue(user, firstNameAttribute),
|
||||
getAttributeValue(user, lastNameAttribute),
|
||||
getAttributeValue(user, displayNameAttribute),
|
||||
getAttributeValue(user, nickNameAttribute),
|
||||
getAttributeValue(user, preferredUsernameAttribute),
|
||||
domain.EmailAddress(user.GetAttributeValue(emailAttribute)),
|
||||
emailVerified,
|
||||
domain.PhoneNumber(user.GetAttributeValue(phoneAttribute)),
|
||||
@ -277,3 +279,15 @@ func mapLDAPEntryToUser(
|
||||
user.GetAttributeValue(profileAttribute),
|
||||
), nil
|
||||
}
|
||||
|
||||
func getAttributeValue(user *ldap.Entry, attribute string) string {
|
||||
// return an empty string if no attribute is needed
|
||||
if attribute == "" {
|
||||
return ""
|
||||
}
|
||||
value := user.GetAttributeValue(attribute)
|
||||
if utf8.ValidString(value) {
|
||||
return value
|
||||
}
|
||||
return base64.StdEncoding.EncodeToString(user.GetRawAttributeValue(attribute))
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ func (msg *Email) GetContent() (string, error) {
|
||||
headers := make(map[string]string)
|
||||
from := msg.SenderEmail
|
||||
if msg.SenderName != "" {
|
||||
from = fmt.Sprintf("%s <%s>", msg.SenderName, msg.SenderEmail)
|
||||
from = fmt.Sprintf("%s <%s>", bEncodeWord(msg.SenderName), msg.SenderEmail)
|
||||
}
|
||||
headers["From"] = from
|
||||
if msg.ReplyToAddress != "" {
|
||||
@ -55,7 +55,7 @@ func (msg *Email) GetContent() (string, error) {
|
||||
if !isHTML(msg.Content) {
|
||||
mime = "MIME-Version: 1.0" + lineBreak + "Content-Type: text/plain; charset=\"UTF-8\"" + lineBreak + lineBreak
|
||||
}
|
||||
subject := "Subject: " + bEncodeSubject(msg.Subject) + lineBreak
|
||||
subject := "Subject: " + bEncodeWord(msg.Subject) + lineBreak
|
||||
message += subject + mime + lineBreak + msg.Content
|
||||
|
||||
return message, nil
|
||||
@ -70,6 +70,6 @@ func isHTML(input string) bool {
|
||||
}
|
||||
|
||||
// returns a RFC1342 "B" encoded string to allow non-ascii characters
|
||||
func bEncodeSubject(subject string) string {
|
||||
return mime.BEncoding.Encode("UTF-8", subject)
|
||||
func bEncodeWord(word string) string {
|
||||
return mime.BEncoding.Encode("UTF-8", word)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user