각 회사별 데이터 분리
This commit is contained in:
@@ -185,6 +185,9 @@ export class AuthService {
|
||||
//});
|
||||
|
||||
// PersonBean 형태로 변환 (null 값을 undefined로 변환)
|
||||
const companyCode = userInfo.company_code || "ILSHIN";
|
||||
const userType = userInfo.user_type || "USER";
|
||||
|
||||
const personBean: PersonBean = {
|
||||
userId: userInfo.user_id,
|
||||
userName: userInfo.user_name || "",
|
||||
@@ -197,15 +200,21 @@ export class AuthService {
|
||||
email: userInfo.email || undefined,
|
||||
tel: userInfo.tel || undefined,
|
||||
cellPhone: userInfo.cell_phone || undefined,
|
||||
userType: userInfo.user_type || undefined,
|
||||
userType: userType,
|
||||
userTypeName: userInfo.user_type_name || undefined,
|
||||
partnerObjid: userInfo.partner_objid || undefined,
|
||||
authName: authNames || undefined,
|
||||
companyCode: userInfo.company_code || "ILSHIN",
|
||||
companyCode: companyCode,
|
||||
photo: userInfo.photo
|
||||
? `data:image/jpeg;base64,${Buffer.from(userInfo.photo).toString("base64")}`
|
||||
: undefined,
|
||||
locale: userInfo.locale || "KR",
|
||||
// 권한 레벨 정보 추가 (3단계 체계)
|
||||
isSuperAdmin: companyCode === "*" && userType === "SUPER_ADMIN",
|
||||
isCompanyAdmin: userType === "COMPANY_ADMIN" && companyCode !== "*",
|
||||
isAdmin:
|
||||
(companyCode === "*" && userType === "SUPER_ADMIN") ||
|
||||
userType === "COMPANY_ADMIN",
|
||||
};
|
||||
|
||||
//console.log("📦 AuthService - 최종 PersonBean:", {
|
||||
|
||||
Reference in New Issue
Block a user