# 그룹 소유자가 그룹에 멤버를 추가할 수 없습니다

**URL:** https://meta.discourse.org/t/group-owner-can-not-add-members-to-a-group/191505
**Category:** Bug
**Created:** [5월 24, 2021, 8:06오후 UTC](https://meta.discourse.org/t/group-owner-can-not-add-members-to-a-group/191505 "2021-05-24T20:06:00Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Grayden\_Shand](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/grayden_shand/32/166586_2.png) [@Grayden\_Shand](https://meta.discourse.org/u/Grayden_Shand)
#### Post date: [5월 24, 2021, 8:06오후 UTC](https://meta.discourse.org/t/group-owner-can-not-add-members-to-a-group/191505/1 "2021-05-24T20:06:00Z")

</div>

이전에는 잘 작동했던 것 같습니다.

**기대되는 동작**  
그룹 소유자는 “멤버 추가” 모달을 사용하여 그룹에 멤버를 추가할 수 있습니다.

**관찰된 동작**  
그룹 소유자는 “멤버 추가” 모달을 볼 수 있지만, 제출을 시도하면 403 오류(금지됨)가 발생합니다.

두 개의 별도 사이트에서 확인되었습니다.

스크린샷을 첨부합니다:  
[![](https://global.discourse-cdn.com/meta/original/3X/d/c/dcb52a370517a9d00be5b58d06911115746d294b.png) ](https://dl.dropboxusercontent.com/s/wxvv70tbk2hn4lb/Screen%20Shot%202021-05-24%20at%204.03.57%20PM.png?dl=0)

---

<div class="post-metadata">

### Author: ![Benjamin\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjamin_d/32/277831_2.png) [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)
#### Post date: [5월 24, 2021, 8:16오후 UTC](https://meta.discourse.org/t/group-owner-can-not-add-members-to-a-group/191505/2 "2021-05-24T20:16:51Z")

</div>

2.7.0.beta9( [4a2912233c](https://github.com/discourse/discourse/commits/4a2912233c2871e7607648fdf03dd4ae68c3dc67) )에서도 여전히 작동합니다.

---

<div class="post-metadata">

### Author: ![Grayden\_Shand](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/grayden_shand/32/166586_2.png) [@Grayden\_Shand](https://meta.discourse.org/u/Grayden_Shand)
#### Post date: [5월 25, 2021, 1:33오후 UTC](https://meta.discourse.org/t/group-owner-can-not-add-members-to-a-group/191505/4 "2021-05-25T13:33:10Z")

</div>

방금 GitHub에서 최신 코드를 받아와서 다시 테스트했습니다. 버그가 존재하는 것을 확인했습니다. 재현 방법:

1. 새로운 사용자를 생성합니다. 이 사용자는 moderator나 admin이 아니어야 합니다.
2. 다음 설정으로 새로운 그룹을 생성합니다: `Allow users to leave the group freely=True`, `Allow users to send membership requests to group owners=True`, `Who can see this group?=Everyone`, `Who can see this group's members?=Everyone`, `Who can @mention this group?=Only moderators and admins`, `Who can message this group?=Only moderators and admins`.
3. 해당 사용자를 그룹 소유자로 설정합니다.
4. 그룹 소유자로 로그인한 상태에서 다른 사용자를 그룹에 추가하려고 시도합니다.

---

<div class="post-metadata">

### Author: ![Benjamin\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjamin_d/32/277831_2.png) [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)
#### Post date: [5월 25, 2021, 1:46오후 UTC](https://meta.discourse.org/t/group-owner-can-not-add-members-to-a-group/191505/5 "2021-05-25T13:46:37Z")

</div>

사용자가 TL2이거나 그 이상이라고 가정합니다?

---

<div class="post-metadata">

### Author: ![Grayden\_Shand](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/grayden_shand/32/166586_2.png) [@Grayden\_Shand](https://meta.discourse.org/u/Grayden_Shand)
#### Post date: [5월 25, 2021, 1:50오후 UTC](https://meta.discourse.org/t/group-owner-can-not-add-members-to-a-group/191505/6 "2021-05-25T13:50:02Z")

</div>

이 문제를 해결했습니다.

문제를 일으키던 줄은 다음입니다: [discourse/app/controllers/groups\_controller.rb at e2e13a70f63605b92b4e521cc9f818061c1ccfb6 · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/e2e13a70f63605b92b4e521cc9f818061c1ccfb6/app/controllers/groups_controller.rb#L325)

@Benjamin_D 님이 정확히 짚어주셨습니다. TL(신뢰 수준) 문제입니다.

`min_trust_level_to_allow_invite`라는 사이트 설정이 있으며, 이 값은 TL2로 설정되어 있었지만 그룹 소유자는 TL1이었습니다.

그룹 소유자가 신뢰 수준 요건을 충족하지 못해도 그룹에 사용자를 초대할 수 있어야 할까요? 다소 혼란스럽네요.

---

<div class="post-metadata">

### Author: ![Benjamin\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjamin_d/32/277831_2.png) [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)
#### Post date: [5월 25, 2021, 2:00오후 UTC](https://meta.discourse.org/t/group-owner-can-not-add-members-to-a-group/191505/7 "2021-05-25T14:00:54Z")

</div>

> [@Grayden\_Shand](#):
>
> 그룹 소유자가 신뢰 수준 요건을 충족하지 못해도 그룹에 사용자를 초대할 수 있어야 할까요? 좀 혼란스럽네요.

🤔 맞아요, 아마 초대할 수 있어야 할 것 같네요? 아니면 신뢰 수준 요건을 충족하지 못하면 소유자가 아니어야 하는 거겠죠?

---

<div class="post-metadata">

### Author: ![Grayden\_Shand](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/grayden_shand/32/166586_2.png) [@Grayden\_Shand](https://meta.discourse.org/u/Grayden_Shand)
#### Post date: [5월 25, 2021, 2:13오후 UTC](https://meta.discourse.org/t/group-owner-can-not-add-members-to-a-group/191505/8 "2021-05-25T14:13:50Z")

</div>

> [@Benjamin\_D](#):
>
> 아니면 TL 기준을 충족하지 못한다면 소유자(owner)가 아니어야 하는 거 아닌가요?

그것도 합리적인 방법입니다.

아니면 이 부분에 대해 더 구체적인 에러를 추가하는 것도 좋겠습니다.  
예를 들어, (en) 메시지 `You are not permitted to view the requested resource.`를 사용하여 `InvalidAccess` 에러를 발생시키는 대신,

(en) 메시지 `You do not have the required trust level to view the requeted resource`를 가진 `InsufficientTrustLevel` 에러(아마도 `InvalidAccess`의 하위 클래스로)를 생성하는 것입니다. 그러면 최소한 관리자분들이 이것이 버그가 아니라 TL 문제임을 알 수 있을 것입니다.

코드베이스에서 이 부분들이 정의된 위치에 대한 참고 사항:

- [InvalidAccess Error](https://github.com/discourse/discourse/blob/e2e13a70f63605b92b4e521cc9f818061c1ccfb6/lib/discourse.rb#L159)
- [InvalidAccess Error english locale definition](https://github.com/discourse/discourse/blob/e2e13a70f63605b92b4e521cc9f818061c1ccfb6/config/locales/server.en.yml#L286)

이 방향으로 진행하는 것이 좋다면 PR을 만들 수 있습니다.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [5월 26, 2021, 1:01오후 UTC](https://meta.discourse.org/t/group-owner-can-not-add-members-to-a-group/191505/10 "2021-05-26T13:01:52Z")

</div>

여기 더 나은 오류 메시지가 필요하다는 데는 동의하지만, 실제로는 기능이 퇴보했다고 생각합니다.

그룹 소유자의 역할은 해당 그룹의 멤버십을 관리하는 것입니다. 그룹에 사용자를 초대/추가할 수 없다면, 그 기능은 반쯤 고장 난 상태라고 할 수 있습니다…

@dan, 이 문제를 목록에 추가해 주시겠어요?

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [5월 26, 2021, 1:58오후 UTC](https://meta.discourse.org/t/group-owner-can-not-add-members-to-a-group/191505/11 "2021-05-26T13:58:15Z")

</div>

정말 멋진 탐정 놀이였네요, 여러분!

제 생각이 틀렸을 수도 있지만, 이 상황은 초대 시스템을 개선하기 위해 진행 중인 작업의 일환으로 발생한 것으로 보입니다. 모든 초대가 동일한 초대 시스템을 사용하도록 정규화하고, 기존 사용자와 관련된 기능을 분리하고 있습니다. 최근에는 기존 사용자에게 토픽에 대한 알림을 보내는 방식을 변경했는데, 이제 토픽 메뉴의 공유 버튼을 통해 기존 사용자에게 알림을 보내도록 하였고, 이는 사이트 가입 및 토픽 기여를 위한 신규 사용자 초대와 별도로 처리됩니다.

그룹에도 동일한 방식을 적용할 예정입니다. 이미 이 작업을 진행할 목록에 올려두었지만, 이제 사이트에서 신규 사용자를 초대할 수 있는 충분한 TL이 없으면 아무도 그룹에 추가할 수 없는 상황이 된다면, 이 문제가 더 시급해졌다고 생각됩니다.

---

<div class="post-metadata">

### Author: ![dan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dan/32/101549_2.png) [@dan](https://meta.discourse.org/u/dan)
#### Post date: [6월 2, 2021, 2:15오후 UTC](https://meta.discourse.org/t/group-owner-can-not-add-members-to-a-group/191505/13 "2021-06-02T14:15:53Z")

</div>

그룹에 이메일을 초대할 때 해당 제한은 타당합니다. 그러나 기존 사용자를 초대할 때는 그렇지 않습니다. 이 문제는 다음에서 수정했습니다:

> <https://github.com/discourse/discourse/pull/13230>
>
> It used to require SiteSetting.min\_trust\_level\_to\_allow\_invite to
> invite a user… to a group, even if the user existed and the inviter was
> a group owner.

이로써 당분간 문제가 해결될 것입니다. 다만 이 영역을 전면 개편할 예정입니다.

---

<div class="post-metadata">

### Author: ![dan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dan/32/101549_2.png) [@dan](https://meta.discourse.org/u/dan)
#### Post date: [6월 5, 2021, 8:00오전 UTC](https://meta.discourse.org/t/group-owner-can-not-add-members-to-a-group/191505/14 "2021-06-05T08:00:01Z")

</div>

이 주제는 2일 후 자동으로 닫혔습니다. 더 이상 답변을 작성할 수 없습니다.
