Please make tl for sending invites customisable

Hi,

The problem I am currently having is that trusted user (TU) means two different things in site settings.

In “Trusted user can edit others”, TU means tl3 or above.
But in “new users must be explicitly invited by trusted users or staff.”, TU means tl2 or above.

We want our site to be invite-only. And we specifically want only tl3 and above to be able to send invites for reasons I shan’t go into here.

:arrow_right: Can a feature please be added so that the tl for sending invites is customisable?
(Alternatively, please make TU always mean only tl3 and above. It’s very confusing having the same words mean two different things.)

Thank you!

4 Likes

I think it makes sense to allow fidelity around trust level required to invite @codinghorror should we add a #pr-welcome on this?

2 Likes

Based on this single request? That’s not usually how we do things.

There’s been a lot of requests for this over the years. It especially makes sense for the first month of a no-import migration.

5 Likes

Discussed internally and we support adding 2 site setting in a PR (containing tests)

  1. min trust to allow invite
  2. min trust to allow pm invite

Added #pr-welcome here in case the community want to fast track this, otherwise we will probably get to it in 2.5 or 2.6

14 Likes

Please do 1. min trust to allow invite in 2.5!
Thank you.

1 Like

what I understood is

  1. You want site admin to set the trust level to send invites (eg: drop-down to select the trust level and that trust level user will be allowed to send invites)
  2. The similar setting for sending pm invites

and both of these settings are currently hardcoded which needs to be made dynamic

I’m interested to make a PR for this

6 Likes

Yes that is about it, also needs to be carefully tested! Go for it.

4 Likes

https://github.com/discourse/discourse/blob/67a310db02a0005ecce73c271d843439a96d5de2/lib/guardian.rb#L374

@sam I think this line handles both(regular topics and PMs invite). I think it would make more sense to create a common setting for PMs and Topics and a separate one for forum invites? What do you think?

2 Likes

Sorry we left this in the air for so long… Yeah in the spirit of simplicity maybe just a single site setting min_trust_level_to_allow_invite then we don’t need to explain about all the different flavors of invite.

8 Likes

A pr for this is merged to the master

https://github.com/discourse/discourse/pull/10984

7 Likes