Default Reserved usernames can not be deleted

For some reason I can not delete the default “Reserved Usernames” (I could a few weeks ago, but not anymore) - they all are disabled.

  • I am logged in with admin account (the one I created during first signup after installation). There is one more admin account and for both it shows the same way
  • The discourse is up to date
  • I tried to login in incognito (for prevent possible cache/cookie related issues), same thing

Note sure if this is related - but at some point in time I when I created a second admin account, from that (second) admin account I revoked the admin privileges of the first/initial admin and then granted admin again (so ATM both are admin).

Both admins have admin and moderator privileges and are connected to admin and moderator groups


Hi @tig3,

Your changes to your admin lineup are not related. The default reserved usernames are now hard-coded as mandatory values.

3 Likes

Hi @Southpaw thanks for the reply.

But would not it be better to hardcode just one or two (assuming the problem is in null values of that field, from what I understand from the commit message). I mean suppose I want to create a user with “support” or “info” usernames for some messages in the forum (or just Admin), so should I just change the yml file and rebuild to be able to do so ?

Thank you

If they can’t be deleted they shouldn’t be there any more. The tokens all have X symbols that make it look like I can be deleted. Or at least the Xs should be removed.

The descriptive text could list the mandatory ones instead (or explain why some have no Xs, as the case may be).

I think the x symbols are removed from the mandatory values

@Southpaw I just did a fresh installation and tried editing the site_settings.yml and it does not work neither before nor after rebuild.

So, could you please let me know if there is any way, so I can remove those values from mandatory so I can create users with those usernames.

1 Like

I take it all back then. I looked using my forum, but now see that I need to upgrade!

(Incidentally I wasn’t able to quote you as I wasn’t able to highlight any text – iPhone using Hub app.)

iPhones do that every now and then. And quite often, at same time, it refuses open the composer. Closing and re-open fixes it. This could need a bug report, but iPhones are a bit pain in the tender places and that issue isn’t consistent, so I never bothered.

@Southpaw It worked after restarting, however still after the rebuild it gets back to default settings.

Considering that the idea of that commit was to simply disallow empty values for the key, would not it be more reasonable to set the mandatory_values as some dummy value, so it would suffice the condition of not being empty and exclude all the important values from it ?

Please let me know if such pull request could be accepted. Thanks

2 Likes

I removed a few here (info, support, and community) as mandatory values, the rest can stay as-is as they are much more likely to be confusing to members.

2 Likes

@martin Thank you, however I believe all others should be deleted as well (leaving some random/dummy value as per my previous reply)

I believe for that reason those values already exist under default

and still no user can use them, unless Admin decides to allow their usage - deleting from that list from admin panel.

And in my opinion for self-hosted setup its better to give a freedom to admin to decide.

Please consider this scenario: I want to add account with name moderator, with existing setup I have to ssh to my server change site settings file (deleting the value in mandatory_values) and restart the container to be able to do it (and after rebuild this change is being reset).

But, if all values (well, except one) from mandatory_values are deleted (but NOT from default), as Admin I can simply delete “moderator” value in admin panel (under reserved usernames), quickly rename some existing user’s username to moderator and again add the word moderator - to prevent future usage.

So, with my suggested approach still all those usernames are disallowed by default, however admin can easly delete/add them whenever needed without being have to make changes in site settings files.

I think that depends on the language used. In a German forum, “you” isn’t confusing at all.

1 Like