Newuser max links sitesetting

AI-generated summary

The discussion revolves around the ‘Newuser max links’ site setting in Discourse, which is intended to limit how many links new users (TL0) can post. leo.proctor reports that setting it to 0 doesn’t prevent new users from posting URLs — including oneboxed links — because the code filters out hrefs with the .onebox class. codinghorror questions whether the setting still works, citing that eviltrout recently used it for a customer. eviltrout clarifies that the setting is outdated, only applies to TL0, and doesn’t count oneboxes as links — recommending instead the more robust min trust to post links setting, which does include oneboxes. codinghorror suggests removing the old setting, but tophee argues it still has value for allowing TL0 users to post a few links without full restriction. eviltrout confirms the two settings are only equivalent when set to 0, implying the old setting retains some unique utility. The thread highlights the limitations of the legacy setting and the preference for the newer, more flexible alternative.

What is this setting for?

Screenshot%20from%202018-03-20%2012%3A16%3A26

I’ve set it to 0, but a new user can still add urls to a post. like https://www.google.com/

Upone further debugging, it leads me here. cooked_stripped doesn’t return href urls because it is removed for having .onebox class.

I believe this setting works, because I know @eviltrout set it to zero recently for a customer. Can you confirm Robin?

That particular (old) setting is not the greatest, and can essentially be considered deprecated unless you want to depend on its behavior. It only applies to TL0, and as you noticed it does not include oneboxes.

There is another setting that is more powerful and probably does what you want, min trust to post links. It allows you to choose the trust level that the links applies to, and it counts oneboxes as links.

Should we remove the old setting?

As flawed as it may be, it is not really replaced by min trust to post links, is it? It makes sense to allow TL0 users to post a few links but not too many…

Yes. It’s only the “same” when set to 0.