소유자 권한 보호와 멤버 목록 등급 표시 v1.5.8
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user