[MM-63355] Add AuthData to mmctl user search output (#30478)

Этот коммит содержится в:
Ben Schumacher
2025-06-19 11:52:16 +02:00
коммит произвёл GitHub
родитель 04a60b6609
Коммит cfc1503d62
7 изменённых файлов: 138 добавлений и 72 удалений

Просмотреть файл

@@ -779,6 +779,7 @@ func deleteAllUsersCmdF(c client.Client, cmd *cobra.Command, args []string) erro
type userOut struct {
*model.User
Deactivated bool
AuthData string
}
func searchUserCmdF(c client.Client, cmd *cobra.Command, args []string) error {
@@ -799,6 +800,10 @@ func searchUserCmdF(c client.Client, cmd *cobra.Command, args []string) error {
User: user,
Deactivated: !(user.DeleteAt == 0),
}
if user.AuthData != nil {
uout.AuthData = *user.AuthData
}
tpl := `id: {{.Id}}
deactivated: {{.Deactivated}}
username: {{.Username}}
@@ -807,7 +812,8 @@ position: {{.Position}}
first_name: {{.FirstName}}
last_name: {{.LastName}}
email: {{.Email}}
auth_service: {{.AuthService}}`
auth_service: {{.AuthService}}
auth_data: {{.AuthData}}`
if i > 0 {
tpl = "------------------------------\n" + tpl
}