How to disable updating username for admins & moderators?

AI-generated summary

The discussion revolves around disabling the ability for admins and moderators to update their usernames in Discourse. RohitSharma initially asked for guidance on this issue, but Jagster and pfaffman argue that this is not a necessary feature, as admins and moderators should be trusted to follow rules. However, pfaffman also suggests that a custom plugin could be created to disable username changes, and offers to help RohitSharma with this.

Hi,

I need guidance to disable the edit button for admins and moderators. So do we have any setting in discourse to do this?

Please find the attached screenshot:

Thanks
Rohit

Using CSS is the easiest, but not the most robust solution.

Admins can and must have ability to do everythings. Moderators are in (almost) same situation with content and users. But both groups are really small and because they must follow rules of a forum then just simple guidance is enough, and staff watches theirs own group. If someone can’t follow such trivial rule could that person follow any other rules either?

So — such option isn’t needed, as I see it.

Exactly. If you don’t trust your admins and moderators not to change their usernames then you have dramatically bigger problems than their usernames getting changed.

But if CSS isn’t good enough, a custom plugin could disable changing usernames.

Can you please suggest Using which custom plugin can I disable username?

You would need to create or commission it. You can post in Marketplace or contact me directly. See Developing Discourse Plugins - Part 1 - Create a basic plugin if you’d like to do it yourself.