forked from baron/baron-sso
dev 반영 code check 오류 수정
This commit is contained in:
@@ -15,6 +15,7 @@ saman = "Saman"
|
||||
[domain.tenant_type]
|
||||
company = "Company"
|
||||
company_group = "Company Group"
|
||||
organization = "Organization"
|
||||
personal = "Personal"
|
||||
user_group = "User Group"
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ saman = "삼안"
|
||||
[domain.tenant_type]
|
||||
company = "COMPANY (일반 기업)"
|
||||
company_group = "COMPANY_GROUP (그룹사/지주사)"
|
||||
organization = "ORGANIZATION (정규 조직)"
|
||||
personal = "PERSONAL (개인 워크스페이스)"
|
||||
user_group = "USER_GROUP (내부 부서/팀)"
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ saman = ""
|
||||
[domain.tenant_type]
|
||||
company = ""
|
||||
company_group = ""
|
||||
organization = ""
|
||||
personal = ""
|
||||
user_group = ""
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
const Map<String, String> internalErrorWhitelistMessageKeys = {
|
||||
'settings_disabled': 'msg.userfront.error.whitelist.settings_disabled',
|
||||
'invalid_session': 'msg.userfront.error.whitelist.invalid_session',
|
||||
'verification_required': 'msg.userfront.error.whitelist.verification_required',
|
||||
'verification_required':
|
||||
'msg.userfront.error.whitelist.verification_required',
|
||||
'recovery_expired': 'msg.userfront.error.whitelist.recovery_expired',
|
||||
'recovery_invalid': 'msg.userfront.error.whitelist.recovery_invalid',
|
||||
'rate_limited': 'msg.userfront.error.whitelist.rate_limited',
|
||||
|
||||
@@ -332,14 +332,18 @@ class _ErrorScreenState extends State<ErrorScreen> {
|
||||
final showTenantLookupFallback =
|
||||
_tenantAccessDetails == null &&
|
||||
(emailLabel.isEmpty || tenantLabel.isEmpty);
|
||||
final internalWhitelistDetail = internalWhitelistKey == null
|
||||
? null
|
||||
: tr(internalWhitelistKey);
|
||||
final detail = isTenantAccessBlocked
|
||||
? tr(
|
||||
'msg.userfront.error.tenant.detail',
|
||||
fallback: 'The current signed-in account cannot access this application.',
|
||||
fallback:
|
||||
'The current signed-in account cannot access this application.',
|
||||
)
|
||||
: isProd
|
||||
? (isInternalWhitelisted
|
||||
? tr(internalWhitelistKey!)
|
||||
? internalWhitelistDetail!
|
||||
: (isOryBypass
|
||||
? tr(
|
||||
'msg.userfront.error.ory.$normalizedCode',
|
||||
@@ -444,7 +448,8 @@ class _ErrorScreenState extends State<ErrorScreen> {
|
||||
child: Text(
|
||||
tr(
|
||||
'msg.userfront.error.tenant.loading',
|
||||
fallback: 'Loading the current account details.',
|
||||
fallback:
|
||||
'Loading the current account details.',
|
||||
),
|
||||
style: theme.textTheme.bodySmall
|
||||
?.copyWith(
|
||||
|
||||
@@ -846,8 +846,7 @@ class _SignupScreenState extends State<SignupScreen> {
|
||||
final preferredLocaleCode = resolvePreferredLocaleCode();
|
||||
final useEnglishFallback =
|
||||
preferredLocaleCode.startsWith('en') && englishFallback != null;
|
||||
if (
|
||||
localized.isEmpty ||
|
||||
if (localized.isEmpty ||
|
||||
placeholders.contains(localized) ||
|
||||
hasCorruptedEscapes) {
|
||||
return useEnglishFallback ? englishFallback : fallback;
|
||||
|
||||
@@ -35,40 +35,26 @@ const Map<String, String> koStrings = {
|
||||
"err.userfront.auth_proxy.linked_app_revoke": "연동 해지에 실패했습니다.",
|
||||
"err.userfront.auth_proxy.login_failed": "로그인에 실패했습니다.",
|
||||
"err.userfront.auth_proxy.login_init": "로그인 초기화에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.login_poll":
|
||||
"로그인 상태 확인에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.login_poll": "로그인 상태 확인에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.oidc_accept": "OIDC 로그인 승인에 실패했습니다.",
|
||||
"err.userfront.auth_proxy.password_reset_complete": "비밀번호 재설정에 실패했습니다.",
|
||||
"err.userfront.auth_proxy.password_policy_fetch":
|
||||
"비밀번호 정책을 불러오지 못했습니다.",
|
||||
"err.userfront.auth_proxy.password_policy_fetch": "비밀번호 정책을 불러오지 못했습니다.",
|
||||
"err.userfront.auth_proxy.password_reset_init": "비밀번호 재설정을 시작하지 못했습니다.",
|
||||
"err.userfront.auth_proxy.profile_load":
|
||||
"프로필을 불러오지 못했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.tenant_info_fetch":
|
||||
"테넌트 정보를 불러오지 못했습니다.",
|
||||
"err.userfront.auth_proxy.profile_load": "프로필을 불러오지 못했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.tenant_info_fetch": "테넌트 정보를 불러오지 못했습니다.",
|
||||
"err.userfront.auth_proxy.verify_failed": "검증에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.sms_send": "SMS 전송에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.code_verify":
|
||||
"인증 코드 확인에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.qr_init":
|
||||
"QR 로그인을 시작하지 못했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.qr_poll":
|
||||
"QR 상태 확인에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.code_verify": "인증 코드 확인에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.qr_init": "QR 로그인을 시작하지 못했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.qr_poll": "QR 상태 확인에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.qr_approve": "QR 승인에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.user_create":
|
||||
"사용자 생성에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.user_list":
|
||||
"사용자 목록 조회에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.user_delete":
|
||||
"사용자 삭제에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.user_status_update":
|
||||
"상태 업데이트에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.user_update":
|
||||
"사용자 수정에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.linked_apps_load":
|
||||
"연동된 앱 목록을 불러오지 못했습니다.",
|
||||
"err.userfront.auth_proxy.phone_code_send":
|
||||
"인증 코드 전송에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.user_create": "사용자 생성에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.user_list": "사용자 목록 조회에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.user_delete": "사용자 삭제에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.user_status_update": "상태 업데이트에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.user_update": "사용자 수정에 실패했습니다: {{error}}",
|
||||
"err.userfront.auth_proxy.linked_apps_load": "연동된 앱 목록을 불러오지 못했습니다.",
|
||||
"err.userfront.auth_proxy.phone_code_send": "인증 코드 전송에 실패했습니다: {{error}}",
|
||||
"err.userfront.profile.load_failed": "프로필을 불러오지 못했습니다: {{error}}",
|
||||
"err.userfront.profile.password_change_failed": "비밀번호 변경에 실패했습니다: {{error}}",
|
||||
"err.userfront.profile.send_code_failed": "인증번호 전송 실패: {{error}}",
|
||||
@@ -621,8 +607,7 @@ const Map<String, String> koStrings = {
|
||||
"재설정 링크가 만료되었습니다. 다시 요청해 주세요.",
|
||||
"msg.userfront.error.whitelist.recovery_invalid": "재설정 링크가 유효하지 않습니다.",
|
||||
"msg.userfront.error.whitelist.settings_disabled": "현재 계정 설정 화면은 준비 중입니다.",
|
||||
"msg.userfront.error.whitelist.tenant_not_allowed":
|
||||
"허용되지 않은 테넌트입니다.",
|
||||
"msg.userfront.error.whitelist.tenant_not_allowed": "허용되지 않은 테넌트입니다.",
|
||||
"msg.userfront.error.whitelist.verification_required":
|
||||
"추가 인증이 필요합니다. 안내에 따라 진행해 주세요.",
|
||||
"msg.userfront.forgot.description":
|
||||
@@ -2059,15 +2044,12 @@ const Map<String, String> enStrings = {
|
||||
"Failed to load the profile: {{error}}",
|
||||
"err.userfront.auth_proxy.tenant_info_fetch":
|
||||
"Failed to load tenant information.",
|
||||
"err.userfront.auth_proxy.verify_failed":
|
||||
"Verification failed: {{error}}",
|
||||
"err.userfront.auth_proxy.verify_failed": "Verification failed: {{error}}",
|
||||
"err.userfront.auth_proxy.sms_send": "Failed to send SMS: {{error}}",
|
||||
"err.userfront.auth_proxy.code_verify":
|
||||
"Failed to verify the code: {{error}}",
|
||||
"err.userfront.auth_proxy.qr_init":
|
||||
"Failed to start QR login: {{error}}",
|
||||
"err.userfront.auth_proxy.qr_poll":
|
||||
"Failed to check QR status: {{error}}",
|
||||
"err.userfront.auth_proxy.qr_init": "Failed to start QR login: {{error}}",
|
||||
"err.userfront.auth_proxy.qr_poll": "Failed to check QR status: {{error}}",
|
||||
"err.userfront.auth_proxy.qr_approve":
|
||||
"Failed to approve QR login: {{error}}",
|
||||
"err.userfront.auth_proxy.user_create":
|
||||
|
||||
@@ -78,7 +78,7 @@ void main() {
|
||||
);
|
||||
final detail = tr(
|
||||
'msg.userfront.error.whitelist.settings_disabled',
|
||||
fallback: internalErrorWhitelistMessages['settings_disabled']!,
|
||||
fallback: tr(internalErrorWhitelistMessageKeys['settings_disabled']!),
|
||||
);
|
||||
final type = tr(
|
||||
'msg.userfront.error.type',
|
||||
@@ -160,7 +160,7 @@ void main() {
|
||||
|
||||
final detail = tr(
|
||||
'msg.userfront.error.whitelist.not_found',
|
||||
fallback: internalErrorWhitelistMessages['not_found']!,
|
||||
fallback: tr(internalErrorWhitelistMessageKeys['not_found']!),
|
||||
);
|
||||
final type = tr(
|
||||
'msg.userfront.error.type',
|
||||
@@ -185,7 +185,7 @@ void main() {
|
||||
|
||||
final detail = tr(
|
||||
'msg.userfront.error.whitelist.rate_limited',
|
||||
fallback: internalErrorWhitelistMessages['rate_limited']!,
|
||||
fallback: tr(internalErrorWhitelistMessageKeys['rate_limited']!),
|
||||
);
|
||||
final type = tr(
|
||||
'msg.userfront.error.type',
|
||||
@@ -214,28 +214,12 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
final title = tr(
|
||||
'msg.userfront.error.tenant.page_title',
|
||||
fallback: '애플리케이션 접근이 제한되었습니다',
|
||||
);
|
||||
final detail = tr(
|
||||
'msg.userfront.error.tenant.detail',
|
||||
fallback: '현재 로그인된 계정은 이 애플리케이션에 접근할 수 없습니다.',
|
||||
);
|
||||
final account = tr('msg.userfront.error.tenant.account', fallback: '계정');
|
||||
final primaryTenant = tr(
|
||||
'msg.userfront.error.tenant.primary_tenant',
|
||||
fallback: '대표 소속 테넌트',
|
||||
);
|
||||
final affiliatedTenants = tr(
|
||||
'msg.userfront.error.tenant.affiliated_tenants',
|
||||
fallback: '전체 소속 테넌트',
|
||||
);
|
||||
final switchAccount = tr(
|
||||
'ui.userfront.error.switch_account',
|
||||
fallback: '다른 계정으로 로그인',
|
||||
);
|
||||
|
||||
const title = 'Application access is restricted';
|
||||
const detail =
|
||||
'The current signed-in account cannot access this application.';
|
||||
const account = 'Account';
|
||||
const primaryTenant = 'Primary affiliated tenant';
|
||||
const affiliatedTenants = 'All affiliated tenants';
|
||||
expect(find.text(title), findsOneWidget);
|
||||
expect(find.text(detail), findsOneWidget);
|
||||
expect(find.text(account), findsOneWidget);
|
||||
@@ -243,7 +227,8 @@ void main() {
|
||||
expect(find.text(primaryTenant), findsOneWidget);
|
||||
expect(find.text(affiliatedTenants), findsOneWidget);
|
||||
expect(find.text('Baron HQ'), findsNWidgets(2));
|
||||
expect(find.text(switchAccount), findsOneWidget);
|
||||
expect(find.byType(ElevatedButton), findsOneWidget);
|
||||
expect(find.byType(OutlinedButton), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('tenant_not_allowed는 details를 우선 사용해 계정과 테넌트 정보를 노출한다', (
|
||||
|
||||
Reference in New Issue
Block a user