strapi / documentation

Strapi Documentation
https://docs.strapi.io
Other
1.03k stars 1.13k forks source link

Clarify Role parameter usage for Users & Permissions plugin #2157

Closed nikita-fuchs closed 4 months ago

nikita-fuchs commented 4 months ago

What does it do?

provide more information on setting the role of a newly created user.

Why is it needed?

It's unclear what exactly to pass into that field.

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
documentation ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2024 10:23am
pwizla commented 4 months ago

Thank you, @nikita-fuchs. The PR is now approved, merged, should be live on docs.strapi.io in a few minutes, and will be mentioned in the next weekly snapshot release.

nikita-fuchs commented 4 months ago

Hey @pwizla - I made a mistake ! It's only possible to provide a role by ID, not its name. I'm sorry. I'm reverting and creating a new PR.

tchax commented 2 months ago

Hello, To jump on this doc managing-end-users.md, I'm still confused. Using strapi 4.25.10 community, the page http://localhost:1337/admin/content-manager/collection-types/api::band.band/create?plugins[i18n][locale]=en does not match the image provided the doc. The 'role' stuff is not at the same place. More confusing : the doc says the role is optional and is set to the default role when not provided. But when you don't input a role, the "Save" fails with message "Warning: Users must have a role". So what is the expected behavior ? And BTW (I'm new to strapi) what are the requested fields of User since password seems to be requested but does not appear with a star. Thanks for your help

Capture d’écran 2024-09-04 à 20 14 21
pwizla commented 2 months ago

Hey @tchax, thanks for reporting it.

This has probably been changed lately and the documentation team was not made aware of it 😅 I'll update this a.s.a.p.

Edit: Now fixed.