forked from baron/baron-sso
code check 오류 수정
This commit is contained in:
@@ -34,7 +34,12 @@ import {
|
||||
} from "../../components/ui/card";
|
||||
import { Input } from "../../components/ui/input";
|
||||
import { Label } from "../../components/ui/label";
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../components/ui/tabs";
|
||||
import {
|
||||
Tabs,
|
||||
TabsContent,
|
||||
TabsList,
|
||||
TabsTrigger,
|
||||
} from "../../components/ui/tabs";
|
||||
import { toast } from "../../components/ui/use-toast";
|
||||
import {
|
||||
type UserSummary,
|
||||
@@ -311,10 +316,12 @@ function UserDetailPage() {
|
||||
queryFn: () => fetchTenants(100, 0),
|
||||
});
|
||||
const tenants = tenantsData?.items ?? [];
|
||||
const { data: passwordPolicy, isLoading: isPasswordPolicyLoading } = useQuery({
|
||||
queryKey: ["password-policy"],
|
||||
queryFn: fetchPasswordPolicy,
|
||||
});
|
||||
const { data: passwordPolicy, isLoading: isPasswordPolicyLoading } = useQuery(
|
||||
{
|
||||
queryKey: ["password-policy"],
|
||||
queryFn: fetchPasswordPolicy,
|
||||
},
|
||||
);
|
||||
|
||||
const {
|
||||
register,
|
||||
@@ -978,9 +985,10 @@ function UserDetailPage() {
|
||||
"msg.userfront.signup.policy.summary",
|
||||
"보안 정책: {{rules}}",
|
||||
{
|
||||
rules: buildPasswordPolicyDescription(
|
||||
passwordPolicy,
|
||||
),
|
||||
rules:
|
||||
buildPasswordPolicyDescription(
|
||||
passwordPolicy,
|
||||
),
|
||||
},
|
||||
)}
|
||||
</p>
|
||||
@@ -988,9 +996,7 @@ function UserDetailPage() {
|
||||
<div className="relative flex-1">
|
||||
<Input
|
||||
id="manualPassword"
|
||||
type={
|
||||
isManualPasswordVisible ? "text" : "password"
|
||||
}
|
||||
type={isManualPasswordVisible ? "text" : "password"}
|
||||
value={manualPassword}
|
||||
placeholder=" "
|
||||
className="peer pr-12 pt-5"
|
||||
@@ -1005,7 +1011,10 @@ function UserDetailPage() {
|
||||
htmlFor="manualPassword"
|
||||
className="pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 bg-background px-1 text-sm text-muted-foreground transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:translate-y-[-50%] peer-focus:text-xs peer-[&:not(:placeholder-shown)]:top-0 peer-[&:not(:placeholder-shown)]:translate-y-[-50%] peer-[&:not(:placeholder-shown)]:text-xs"
|
||||
>
|
||||
{t("ui.userfront.reset.new_password", "새 비밀번호")}
|
||||
{t(
|
||||
"ui.userfront.reset.new_password",
|
||||
"새 비밀번호",
|
||||
)}
|
||||
</label>
|
||||
<Button
|
||||
type="button"
|
||||
@@ -1032,9 +1041,7 @@ function UserDetailPage() {
|
||||
<div className="relative flex-1">
|
||||
<Input
|
||||
id="manualPasswordConfirm"
|
||||
type={
|
||||
isManualPasswordVisible ? "text" : "password"
|
||||
}
|
||||
type={isManualPasswordVisible ? "text" : "password"}
|
||||
value={manualPasswordConfirm}
|
||||
placeholder=" "
|
||||
className="peer pr-12 pt-5"
|
||||
|
||||
@@ -16,15 +16,15 @@ import (
|
||||
)
|
||||
|
||||
type KratosIdentity struct {
|
||||
ID string `json:"id"`
|
||||
SchemaID string `json:"schema_id,omitempty"`
|
||||
Traits map[string]interface{} `json:"traits"`
|
||||
State string `json:"state,omitempty"`
|
||||
MetadataAdmin interface{} `json:"metadata_admin,omitempty"`
|
||||
MetadataPublic interface{} `json:"metadata_public,omitempty"`
|
||||
ExternalID string `json:"external_id,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at,omitempty"`
|
||||
UpdatedAt time.Time `json:"updated_at,omitempty"`
|
||||
ID string `json:"id"`
|
||||
SchemaID string `json:"schema_id,omitempty"`
|
||||
Traits map[string]interface{} `json:"traits"`
|
||||
State string `json:"state,omitempty"`
|
||||
MetadataAdmin interface{} `json:"metadata_admin,omitempty"`
|
||||
MetadataPublic interface{} `json:"metadata_public,omitempty"`
|
||||
ExternalID string `json:"external_id,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at,omitempty"`
|
||||
UpdatedAt time.Time `json:"updated_at,omitempty"`
|
||||
}
|
||||
|
||||
type KratosAdminService interface {
|
||||
|
||||
@@ -313,6 +313,10 @@ not_found = "Not Found"
|
||||
update_error = "Failed to User Edit."
|
||||
update_success = "Update Success"
|
||||
password_generated = "A secure password has been generated."
|
||||
password_generated_help = "Generate a temporary password that meets the security policy and apply it immediately."
|
||||
password_manual_required = "Please enter a password."
|
||||
reset_password_help = "Force-reset the user's password and apply either an auto-generated password or a manually entered one."
|
||||
self_password_reset_blocked = "Please change your own password from the UserFront settings page."
|
||||
|
||||
[msg.admin.users.detail.form]
|
||||
field_required = "Required."
|
||||
@@ -1155,6 +1159,11 @@ back = "Back"
|
||||
edit_title = "Edit Title"
|
||||
title = "User Details"
|
||||
generate_password = "Auto Generate"
|
||||
password_mode_generated = "Auto Generate"
|
||||
password_mode_manual = "Manual Entry"
|
||||
password_result_title = "Reset Password"
|
||||
reset_password_apply = "Apply Password"
|
||||
toggle_password_visibility = "Toggle password visibility"
|
||||
|
||||
[ui.admin.users.detail.breadcrumb]
|
||||
section = "Users"
|
||||
|
||||
@@ -685,6 +685,10 @@ not_found = "사용자를 찾을 수 없습니다."
|
||||
update_error = "사용자 수정에 실패했습니다."
|
||||
update_success = "사용자 정보가 수정되었습니다."
|
||||
password_generated = "안전한 비밀번호가 생성되었습니다."
|
||||
password_generated_help = "보안 기준에 맞는 임시 비밀번호를 자동 생성해 즉시 적용합니다."
|
||||
password_manual_required = "비밀번호를 입력해 주세요."
|
||||
reset_password_help = "사용자의 비밀번호를 강제로 재설정하고 자동 생성하거나 직접 입력한 비밀번호를 적용합니다."
|
||||
self_password_reset_blocked = "본인 계정의 비밀번호는 사용자 포털(UserFront) 설정에서 변경해 주세요."
|
||||
|
||||
[msg.admin.users.list]
|
||||
delete_confirm = "사용자 \"{{name}}\"을(를) 정말 삭제하시겠습니까?"
|
||||
@@ -1145,6 +1149,11 @@ back = "목록으로 돌아가기"
|
||||
edit_title = "정보 수정"
|
||||
title = "사용자 상세"
|
||||
generate_password = "자동 생성"
|
||||
password_mode_generated = "자동 생성"
|
||||
password_mode_manual = "수동 입력"
|
||||
password_result_title = "Reset Password"
|
||||
reset_password_apply = "비밀번호 적용"
|
||||
toggle_password_visibility = "비밀번호 표시 전환"
|
||||
|
||||
[ui.admin.users.list]
|
||||
add = "사용자 추가"
|
||||
|
||||
@@ -685,6 +685,10 @@ not_found = ""
|
||||
update_error = ""
|
||||
update_success = ""
|
||||
password_generated = ""
|
||||
password_generated_help = ""
|
||||
password_manual_required = ""
|
||||
reset_password_help = ""
|
||||
self_password_reset_blocked = ""
|
||||
|
||||
[msg.admin.users.list]
|
||||
delete_confirm = ""
|
||||
@@ -1145,6 +1149,11 @@ back = ""
|
||||
edit_title = ""
|
||||
title = ""
|
||||
generate_password = ""
|
||||
password_mode_generated = ""
|
||||
password_mode_manual = ""
|
||||
password_result_title = ""
|
||||
reset_password_apply = ""
|
||||
toggle_password_visibility = ""
|
||||
|
||||
[ui.admin.users.list]
|
||||
add = ""
|
||||
|
||||
@@ -382,15 +382,11 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||
return;
|
||||
}
|
||||
if ((_passwordPolicy?['number'] ?? true) && !hasNumber) {
|
||||
setState(
|
||||
() => _passwordError = tr('msg.userfront.reset.error.number'),
|
||||
);
|
||||
setState(() => _passwordError = tr('msg.userfront.reset.error.number'));
|
||||
return;
|
||||
}
|
||||
if ((_passwordPolicy?['nonAlphanumeric'] ?? true) && !hasSymbol) {
|
||||
setState(
|
||||
() => _passwordError = tr('msg.userfront.reset.error.symbol'),
|
||||
);
|
||||
setState(() => _passwordError = tr('msg.userfront.reset.error.symbol'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user