Extend user admin model

Hi everyone,

I’am triyng to integrate a form for the users who want to use my application.
The point is I need to create an admin author User with this form. But the admin model is locked, i can’t add some fields to the model and my users author admin need some other fields like “siret” or “iban”. It will be a marketplace with professionals sellers.
I saw on internet some topics about this subject.

There are 2 solutions (i think the solutions are ok but not optimal) :

  • Create a public user with extended model and after create an admin user without the extended fields: here

  • Create a hook to extend the admin model : here

I want to know if there is an other way and if there is not, what option is the best if strapi do some evolutions about it.
Other question, is it possible to have differents fileds for differents admin types. Ex: super admin doesn’t have same fileds than author admin.

Thanks in advance

Not currently @Jean1 with one of the recent releases we did add in the option to use oneWay or manyWay relations to the Admin panel users but those fields will not show up on the actual admin model (as it’s not required). You could for the time being create a model to hold this day with a relation to that (admin panel admins model) but until the strapi-admin package is moved to the plugin you won’t be able to extend it without forking and maintaining your fork of the strapi-admin package.

Hi @DMehaffy thanks for your message, but i’m not sure to understand how to do that. Can you explain a little bit more please and which version of Strapi do I need to do it ?


Do which specifically?

your solution. You said the solution is to create a relation between a custom model with fields and the Admin user model ?

In the content-type builder if you create a model with a relation field, you can point it to the strapi administrators as a source.

I can’t select specifically User (from: admin) like in your screen. Do you know why ?

Admin User model relation is supported from 3.2.0
Check your version and upgrade it

Exactly, check your version. Latest release is v3.3.4

Here are the migration guides: https://strapi.io/documentation/v3.x/migration-guide/

yes thanks i did it ,and it works :partying_face:

1 Like

Is there any progress on converting strapi-admin as plugin?

Not currently, I opened a feature request before I joined the Strapi team:

1 Like

I need to extend same model for both User from Admin and User from user-permission, how could i do that?

I need to edit the login endpoint Admin, Is there any progress about that ?

It won’t happen, security concerns do not enable creating an admin endpoint.