This commit is contained in:
1 parent
e4843e7d1d
commit
1808f14cc6
17 files changed
+711
-23
No files matched your search
+6
-10
@@ -118,7 +118,7 @@
|
||||
requesterTenantId: value(["requester_tenant_id", "requesterTenantId", "tenant_id", "tenantId"]),
|
||||
requesterEmail: requesterEmail,
|
||||
category: normalizeCategory(value(["Category", "category"])),
|
||||
company: getCompanyNameFromEmail(requesterEmail) || value(["requester_company", "company", "organization", "tenant_name", "tenantName", "requester_affiliation"]),
|
||||
company: value(["requester_affiliation", "requester_company", "company", "organization", "tenant_name", "tenantName"]) || getCompanyNameFromEmail(requesterEmail),
|
||||
department: value(["requester_department", "department", "team"]) || "-",
|
||||
author: value(["requester_name", "author_name", "authorName", "name", "author"]) || "작성자",
|
||||
title: value(["title", "subject"]) || "제목 없음",
|
||||
@@ -271,11 +271,11 @@
|
||||
function getPostCompanyLabel(post, user) {
|
||||
post = post || {};
|
||||
const raw = post.raw || {};
|
||||
const savedCompany = raw.requester_affiliation || (raw.extra_fields || {}).requester_affiliation;
|
||||
if (savedCompany) return savedCompany;
|
||||
if (post.company && post.company !== "외부 사용자") return post.company;
|
||||
const emailCompany = getCompanyNameFromEmail(post.requesterEmail || raw.requester_email || raw.requesterEmail);
|
||||
if (emailCompany) return emailCompany;
|
||||
if (post.company && post.company !== "외부 사용자") return post.company;
|
||||
const company = user && (user.company || user.tenantName);
|
||||
if (company && post.requesterTenantId && user.tenantId && String(post.requesterTenantId) === String(user.tenantId)) return company;
|
||||
return post.company || "외부 사용자";
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@
|
||||
const userUuid = raw.userUuid || raw.userId || claims.userId || claims.user_id || sessionStorage.getItem('descopeUserId') || '';
|
||||
const loginId = raw.loginId || (raw.loginIds || [])[0] || raw.email || claims.email || claimProfile.email || sessionStorage.getItem('loginId') || readCookie('descope_login_id') || '';
|
||||
const email = raw.email || claims.email || claimProfile.email || sessionStorage.getItem('loginId') || '';
|
||||
const company = getCompanyNameFromEmail(email) || custom.company || raw.company || claims.company || sessionStorage.getItem('company') || '';
|
||||
const company = raw.company || custom.company || claims.company || sessionStorage.getItem('company') || getCompanyNameFromEmail(email) || '';
|
||||
return {
|
||||
userUuid: userUuid,
|
||||
ssoSubject: ssoSubject,
|
||||
@@ -322,7 +322,7 @@
|
||||
tenantName: tenantName,
|
||||
company: company,
|
||||
familyCompany: custom.familyCompany || custom.family_company || raw.familyCompany || sessionStorage.getItem('familyCompany') || '',
|
||||
department: custom.team || custom.department || raw.department || claims.department || sessionStorage.getItem('team') || '',
|
||||
department: raw.department || custom.team || custom.department || claims.department || sessionStorage.getItem('team') || '',
|
||||
rawClaims: claims
|
||||
};
|
||||
}
|
||||
@@ -351,10 +351,6 @@
|
||||
|
||||
async function loadAuthUser() {
|
||||
const localUser = getAuthUser();
|
||||
if (localUser && localUser.tenantId) {
|
||||
resolvedAuthUser = localUser;
|
||||
return localUser;
|
||||
}
|
||||
if (!config.ssoSessionEndpoint) {
|
||||
resolvedAuthUser = localUser;
|
||||
return localUser;
|
||||
|
||||
Reference in new issue
Block a user