소유자 관리자 진입 권한 보강

This commit is contained in:
2026-08-13 16:11:19 +09:00
parent 1453026e60
commit 2b232d0b51
14 changed files with 73 additions and 20 deletions

15
lib/member-role.js Normal file
View File

@@ -0,0 +1,15 @@
export const MEMBER_ROLE = {
OWNER: 'owner',
ADMIN: 'admin',
VIP: 'vip',
MEMBER: 'member'
}
export const PRIVILEGED_MEMBER_ROLES = [MEMBER_ROLE.OWNER, MEMBER_ROLE.ADMIN]
/**
* 관리자 권한 코드 여부를 확인한다.
* @param {string | undefined | null} roleCode - 권한 코드
* @returns {boolean} 관리자 권한 여부
*/
export const isPrivilegedMemberRole = (roleCode) => PRIVILEGED_MEMBER_ROLES.includes(String(roleCode || ''))