# Staged users can't reply to their own topics

**URL:** https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793
**Category:** Bug
**Created:** [Junho 16, 2016, 11:21pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793 "2016-06-16T23:21:04Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![wityr](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@wityr](https://meta.discourse.org/u/wityr)
#### Post date: [Junho 16, 2016, 11:21pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/1 "2016-06-16T23:21:04Z")

</div>

Use case is private email support portal. We have a private category that a handful of users can access. The general public can send emails to info@foo.bar and they are posted in our _public emails_ category. When one of the discourse users replies, it gets posted in the topic, and the member of the public (now a staged user) gets the reply in an email. This all works well.

As of about a month ago (I just noticed this now and don’t know exactly when it started) when that staged user replies to the topic they started their email is rejected:

> Email can not be processed: Something has gone wrong. Perhaps this topic was closed or deleted while you were looking at it?

This is happening even though the topic is certainly not closed or deleted. Recently updated to 1.6.0.beta8 and the problem persists.

---

<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: [Junho 16, 2016, 11:27pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/2 "2016-06-16T23:27:49Z")

</div>

Any ideas here @zogstrip?

---

<div class="post-metadata">

### Author: ![wityr](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@wityr](https://meta.discourse.org/u/wityr)
#### Post date: [Junho 17, 2016, 11:24pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/3 "2016-06-17T23:24:04Z")

</div>

I scrolled through the logs and found the first occurrence was on April 23rd. Is there a way to find what version we were running at that time?

Backtrace

```
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/logster-1.2.2/lib/logster/logger.rb:74:in `add_with_opts'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/logster-1.2.2/lib/logster/logger.rb:35:in `add'
/usr/local/lib/ruby/2.0.0/logger.rb:445:in `warn'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:160:in `log_email_process_failure'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:52:in `handle_failure'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:42:in `rescue in process_popmail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:24:in `process_popmail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:117:in `block (2 levels) in poll_pop3'
/usr/local/lib/ruby/2.0.0/net/pop.rb:688:in `block in delete_all'
/usr/local/lib/ruby/2.0.0/net/pop.rb:687:in `each'
/usr/local/lib/ruby/2.0.0/net/pop.rb:687:in `delete_all'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:116:in `block in poll_pop3'
/usr/local/lib/ruby/2.0.0/net/pop.rb:531:in `start'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:115:in `poll_pop3'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:15:in `execute'
/var/www/discourse/app/jobs/base.rb:154:in `block (2 levels) in perform'

```

---

<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: [Junho 20, 2016, 3:20pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/4 "2016-06-20T15:20:26Z")

</div>

I’m not sure I understand. What is your private category for? What is its relation to the “_public emails_” category?

---

<div class="post-metadata">

### Author: ![wityr](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@wityr](https://meta.discourse.org/u/wityr)
#### Post date: [Junho 20, 2016, 7:53pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/5 "2016-06-20T19:53:00Z")

</div>

The name of the private category is public emails. The private category is the one for the incoming email, set up as described in [paragraph B4](https://meta.discourse.org/t/setup-incoming-emails-e-mail/42026).

---

<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: [Junho 20, 2016, 8:09pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/6 "2016-06-20T20:09:30Z")

</div>

Ok, can you share the security settings you’ve set up for that category?

---

<div class="post-metadata">

### Author: ![wityr](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@wityr](https://meta.discourse.org/u/wityr)
#### Post date: [Junho 20, 2016, 8:15pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/7 "2016-06-20T20:15:15Z")

</div>

We have a group of users who can Create / Reply / See, and we Accept emails from anonymous users with no accounts. The site wide email in min trust is set at 0.

---

<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: [Junho 26, 2016, 5:26pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/8 "2016-06-26T17:26:32Z")

</div>

Just pushed a fix 🍚

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

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [Junho 26, 2016, 6:19pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/9 "2016-06-26T18:19:23Z")

</div>

Do users lose the ability to do this once they log in on the web, converting them to a regular user?

---

<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: [Junho 26, 2016, 6:31pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/10 "2016-06-26T18:31:33Z")

</div>

If they aren’t part of the restricted groups, yes.

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [Junho 26, 2016, 6:32pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/11 "2016-06-26T18:32:27Z")

</div>

That feels wrong – logging in should never cause you to lose permissions.

Maybe this should affect both staged and non-staged users, as long as the category is set to allow emails from strangers? After all, even non-staged users are strangers _to this category_ 😉

(This still leaves the confusion that the user can interact with the topic by mail but doesn’t see it on the web.)

* * *

There is a large overlap between categories with email-in for strangers and groups with email-in messaging. It feels like this problem is part of the confusion caused by this.  
In the group messaging world, this feels way more natural, because messages offer full access to their participants.

---

<div class="post-metadata">

### Author: ![wityr](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@wityr](https://meta.discourse.org/u/wityr)
#### Post date: [Junho 26, 2016, 7:38pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/12 "2016-06-26T19:38:01Z")

</div>

> [@zogstrip](#):
>
> Just pushed a fix

Working great so far. Thanks! :yey:

> [@fefrei](#):
>
> That feels wrong – logging in should never cause you to lose permissions.

I disagree. Remember the use case is a private email support system. We are a membership based organization (a makerspace) who uses discourse for communication between members, and to handle emails from the public. Only a few of our members get access to read or reply to public emails. We regularly have people email us with questions about our organization before they join, and in turn register on discourse. Just because they have emailed us in the past as a member of the public, does not mean they should be granted access to all our communication with the public, past and future.

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [Junho 26, 2016, 8:49pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/13 "2016-06-26T20:49:35Z")

</div>

> [@wityr](#):
>
> they should be granted access to all our communication with the public, past and future

Wait, that’s not what I’ve been trying to say.

As I understand, the current behavior is:

1. Non-member emails you.
2. This creates a non-public topic.
3. The user can read your replies because they are mailed to him, and can reply to your posts by mail.
4. When the user becomes a member, his old mailed-in posts are associated with him.
5. He still cannot see them on the web, because he cannot read the restricted category.
6. He can no longer send mails to `info@foo.bar` or reply to old conversations per mail, because he no longer is a staged user.

Is that correct with your recent fix, @zogstrip?

If so, I think that (5) is possibly confusing but okay, but (6) is a bug. The fact that the user logged in on the web should not take away the possibility to email `info@foo.bar` or to reply on older conversations he started via mail before he was a member.

Of course, this user should _never_ get full access to the “Public emails” category just because he has posts in there – _maybe_ his own topics (as would be the case with group messaging), but certainly not all.

Does this make more sense? 🙂

---

<div class="post-metadata">

### Author: ![wityr](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@wityr](https://meta.discourse.org/u/wityr)
#### Post date: [Junho 26, 2016, 9:33pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/14 "2016-06-26T21:33:48Z")

</div>

Ah sorry I misunderstood. I get what you are saying now. I just did a quick test by activating the staged user I was using to diagnose the original bug. Once activated that user can actually access and reply to their non-public topic. There was a reply notification that when followed takes the user to the topic. Interestingly there is no category listed under the topic title, and of course they don’t see any other evidence that the restricted category exists. Looks like everything is working as it should 🙂

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [Junho 26, 2016, 9:51pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/15 "2016-06-26T21:51:45Z")

</div>

That sounds great! Thanks for testing 🙂

Can the user still reply via mail, and can he reply on the web?

---

<div class="post-metadata">

### Author: ![wityr](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@wityr](https://meta.discourse.org/u/wityr)
#### Post date: [Junho 26, 2016, 9:54pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/16 "2016-06-26T21:54:49Z")

</div>

> [@fefrei](#):
>
> Can the user still reply via mail, and can he reply on the web?

Yes the user can do both.

---

<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: [Agosto 19, 2016, 10:05pm UTC](https://meta.discourse.org/t/staged-users-cant-reply-to-their-own-topics/45793/17 "2016-08-19T22:05:00Z")

</div>


