소유자 권한 보호와 멤버 목록 등급 표시 v1.5.8

This commit is contained in:
2026-05-27 10:15:34 +09:00
parent e78e09f3fd
commit d7a3149ea1
10 changed files with 60 additions and 8 deletions

View File

@@ -856,6 +856,17 @@ export const updateMemberRoleByAdmin = async (input) => {
})
}
if (
target.id === input.actorUserId &&
target.roleCode === MEMBER_ROLE.OWNER &&
normalizedRole !== MEMBER_ROLE.OWNER
) {
throw createError({
statusCode: 400,
message: '소유자는 본인 권한을 직접 낮출 수 없습니다.'
})
}
if (actor.roleCode === MEMBER_ROLE.ADMIN) {
if (isPrivilegedRole(target.roleCode)) {
throw createError({