Why can't users invite others to messages when account approval is enabled?


#1

Hi!

In my Discourse instance I have the problem that users would like to invite (and remove) other users to (group) messages - but they can’t although all of them have trust level 2 (it’s just a small user base).

What trust level or permissions or settings are required for a user to invite someone to an existing message thread?


(Jeff Atwood) #2

If you have SSO enabled, invites are no longer possible as they would bypass SSO authentication.

Also if you have disabled local auth (username/password accounts) invites are also no longer possible.


(Eli the Bearded) #3

Invite to a topic is different than invite to a forum. You should still be able to invite existing users to participate in a topic with SSO. I believe that is the request here.


(Jeff Atwood) #4

I see, thanks for the clarification @elijah, if we are talking about adding existing accounts to a group message, I can’t think of any reason TL2 users wouldn’t be able to do that.


#5

That’s exactly what my question is about.

All accounts were created by importing them via an Import-Script (based on the punBB Importer) and than assigned trust level 2 (as they were already established members of the old forum).

All admin accounts are able to invite users to group messages. T2 and T3 users not.

More infos: Discourse is v1.7.2 (stable)


(Jeff Atwood) #6

Sounds like something possibly went awry in the import, is my only guess.


#7

I found the problem(?) with my setup.

In lib/guardian.rb method can_invite_to? there is the following check:

and my forum is set up to require staff approval of new members, so that’s why there’s no invitation to group messages. It’s kinda unexpected to have that check for users to invite others to group messages.


PS: A hard coded trust level requirement (last line of the mentioned method) also seems kind of odd. But I’m not sure as I’m really new to discourse (and Ruby in general)


(Jeff Atwood) #8

Hmm technically this is a bit of a bug @techapj as inviting existing users to a PM should not be disallowed in this condition… thanks for tracking that down @XieLong.


(Arpit Jalan) #9

Fixed via


(Arpit Jalan) #10