# New members can't request to join a group

**URL:** https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626
**Category:** Bug
**Created:** [30. Mai 2017 um 17:11 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626 "2017-05-30T17:11:22Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![Martin\_Cash](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin_cash/32/73218_2.png) [@Martin\_Cash](https://meta.discourse.org/u/Martin_Cash)
#### Post date: [30. Mai 2017 um 17:11 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/1 "2017-05-30T17:11:22Z")

</div>

Hi, all. What is the reason why a new member would see this message when they request to join a group? The only thing I can think of is that user level 0 can’t send PMs?

I tested this out with a new user that I created…

 ![](https://global.discourse-cdn.com/meta/original/3X/c/7/c77730d5bdeb2ad78f1ba8800af361fb42a0d947.png)

 ![](https://global.discourse-cdn.com/meta/original/3X/5/5/55cc473dce05e9ef213a37a777f63d0288065b5f.png)

 ![](https://global.discourse-cdn.com/meta/original/3X/2/2/223430c9de014906d1526198a78a560fd4be1f48.png)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [30. Mai 2017 um 17:13 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/2 "2017-05-30T17:13:05Z")

</div>

@tgxworld we are going to need to add a TL0 bypass here

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [30. Mai 2017 um 20:56 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/4 "2017-05-30T20:56:42Z")

</div>

I think this is a muted user? Muted users can’t PM the user who muted them.

---

<div class="post-metadata">

### Author: ![Martin\_Cash](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin_cash/32/73218_2.png) [@Martin\_Cash](https://meta.discourse.org/u/Martin_Cash)
#### Post date: [30. Mai 2017 um 21:53 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/5 "2017-05-30T21:53:18Z")

</div>

This was a new user that I created who hasn’t yet posted. To verify it wasn’t because the user was muted, I went to each of the group owner’s notification profiles and there were no muted users listed.

 ![](https://global.discourse-cdn.com/meta/original/3X/9/f/9fcb73b08c7c7cce836151d324f8675e5f2458b3.png)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [30. Mai 2017 um 21:56 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/6 "2017-05-30T21:56:08Z")

</div>

Yeah, I can confirm this:

 ![](https://global.discourse-cdn.com/meta/original/3X/5/0/50a86058708a9848cfdd2126e760ea7876f763fe.png)

 ![](https://global.discourse-cdn.com/meta/original/3X/c/7/c74e165a4907e5445610ca5fd51dfd2b3a99562c.png)

 ![](https://global.discourse-cdn.com/meta/original/3X/4/e/4eded3919485664379bc1cacdec321d651977200.png)

Quite a few layers of bug here…

Also… it is quite brutal that “to” is blank for request membership groups with no owner.

The UI should not even allow you to have a request membership group with no owner.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [2. Juni 2017 um 12:59 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/7 "2017-06-02T12:59:38Z")

</div>

What caused the 500 error?

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [2. Juni 2017 um 13:00 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/8 "2017-06-02T13:00:22Z")

</div>

Users that can’t PM yet will not be allowed to request membership for a group

[https://github.com/discourse/discourse/commit/5f441a2614b4948e79388af578a9260cfed1e86c](https://github.com/discourse/discourse/commit/5f441a2614b4948e79388af578a9260cfed1e86c)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2. Juni 2017 um 13:03 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/9 "2017-06-02T13:03:45Z")

</div>

It heavily limits the use of open groups, especially if people join a community just to join a group. People should be allowed to request to join even at TL0 imo.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [2. Juni 2017 um 13:08 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/10 "2017-06-02T13:08:30Z")

</div>

Then I think we need to move away from using a PM as the way to request for a membership. We need a group admin page where they can approve/reject requests to join a group. Sending a PM to join a group is proving to be a nightmare now. Allowing a bypass would also mean that TL0 can abuse the PM feature. I believe that `min_trust_level_to_send_messages` site setting needs to be respected here.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2. Juni 2017 um 13:11 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/11 "2017-06-02T13:11:22Z")

</div>

Not really, you would still have a dedicated route for this, the dedicated route can create the PM and the PM can be canned and limited to N requests for invite per day.

This also would “speed up” the request invite process a lot and reduce confusion.

- Click “request invite”
- We disable button and render “Invite requested”

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [2. Juni 2017 um 13:17 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/12 "2017-06-02T13:17:37Z")

</div>

Ah I like this idea where the user wouldn’t have to type a custom message anymore. I’ll need to look through the discussions in the past for this feature though because I might have triggered the composer client side for a reason.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [2. Juni 2017 um 13:32 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/13 "2017-06-02T13:32:17Z")

</div>

> [@sam](#):
>
> Also… it is quite brutal that “to” is blank for request membership groups with no owner.
> 
> The UI should not even allow you to have a request membership group with no owner.

Ah we’re missing a validation here for the `Group` model. `Group#allow_membership_requests` shouldn’t be allowed to `true` for groups with no owners. Will automatically fix the client side problem too.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2. Juni 2017 um 14:08 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/14 "2017-06-02T14:08:23Z")

</div>

I had an idea 🔦

Why not send the message from `system` or `discobot` with the canned body of:

> From: @system  
> Title: @sam requested access to amazing frogs  
> @sam (Sam Saffron) requested to join the group @amazing\_frogs, reply with the text “grant” to grant access.

Reply

> Sure, grant him access

Matches `/grant/i` so

> OK, @sam was added to the @amazing\_frogs group

This system has a HUGE advantage that it allows people to grant access much quicker, cause they can simply reply to an email.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [5. Juni 2017 um 02:08 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/15 "2017-06-05T02:08:46Z")

</div>

> [@tgxworld](#):
>
> Ah we’re missing a validation here for the Group model. Group#allow\_membership\_requests shouldn’t be allowed to true for groups with no owners. Will automatically fix the client side problem too.

Fixed in

[https://github.com/discourse/discourse/commit/ac6c1acbed7817f2769810abf8d8f47080799151](https://github.com/discourse/discourse/commit/ac6c1acbed7817f2769810abf8d8f47080799151)

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [7. Juni 2017 um 08:17 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/16 "2017-06-07T08:17:03Z")

</div>

I still feel like creating a group owners membership management page will be much better for us in the long run instead of the “request membership via a PM” approach. We can just send a notifications to all group owners notifying them of a pending requests queue and use a button to grant the user membership.

We used a PM in the 1.7 release because it was the easiest thing without having to spend too much time on it. Having special triggers in a text can quickly become a nightmare to handle based on my experience building discobot.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [13. Juni 2017 um 08:54 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/17 "2017-06-13T08:54:38Z")

</div>

@sam I threw in a quick fix so that all users no matter what their TL is will be able to submit a request to join a group.

[https://github.com/discourse/discourse/commit/a5d3abc9b6888c382e0094ba03074aff8a450fec](https://github.com/discourse/discourse/commit/a5d3abc9b6888c382e0094ba03074aff8a450fec)

I’m closing this bug report but will be opening another topic to discuss a better flow for group memberships requests.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [13. Juni 2017 um 08:54 UTC](https://meta.discourse.org/t/new-members-cant-request-to-join-a-group/63626/18 "2017-06-13T08:54:40Z")

</div>


