소유자 관리자 진입 권한 보강
This commit is contained in:
15
lib/member-role.js
Normal file
15
lib/member-role.js
Normal 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 || ''))
|
||||
Reference in New Issue
Block a user