How to hide a user?

Is it possible to hide a user, like the Administrator and Guest?
I have a user used specifically for API and want to hide it from other users.
Only can be seen by Administrator.
If not from the desk GUI, how to do it with a script (py or js)?
Thank you

Just a thought, I haven’t tested.

There’s a doctype called “User Group” that I don’t find it be linked to any other doctype. Maybe you can add it as a custom field at “User” master and create a “User Permission”.

Whether Custom Field can be added in User Doctype , We could not !

@Francisco_Buendia
Thanks for the idea. Although not using User Group (I haven’t seen the advantage), I will try with the custom field.

@CA_B.C_Chechani
You can if you set the site with bench --site sitename set-config developer_mode 1

We set site in develpoer mode =1 and when we go to customize user doc type , messages comes you can not customize core doc types

Maybe you put it wrong.
In site_config.json it’s: "developer_mode": 1

Thanks @rahy, It gives message that you can not customize core doc type . Would you please give a try to see the message .

Yes you are right.
So it must be with code.

1 Like

There is need to customize user doc type , do you have any alternative idea other than customizing , especially to add fields , can we use custom field doc type to do the same, any experience , pls share

Take my advise, stay away from customising the user doctype. If you want to make changes, do it on a custom app and use hooks.py to push your modifications.

2 Likes