Skip to content

Conversation

@Convly
Copy link
Member

@Convly Convly commented May 13, 2022

What does it do?

Bypass the default admin user sanitation to force the registrationToken property to be included in the response payload of the create user controller.

Why is it needed?

Since v4.1.10, we're removing the registrationToken from the admin API responses. Even if it works for almost every scenario, we still need this property in the admin user creation flow.

How to test it?

  1. Create a new admin user
  2. In the modal, the registration link should contains a valid registration token
  3. Use this link to register the new admin

Related issue(s)/PR(s)

fix #13300

@Convly Convly added source: core:admin Source is core/admin package pr: fix This PR is fixing a bug labels May 13, 2022
@Convly Convly added this to the 4.1.11 milestone May 13, 2022
@codecov
Copy link

codecov bot commented May 13, 2022

Codecov Report

Merging #13307 (91757fe) into master (b008326) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master   #13307   +/-   ##
=======================================
  Coverage   47.91%   47.92%           
=======================================
  Files         239      239           
  Lines        8813     8814    +1     
  Branches     1984     1984           
=======================================
+ Hits         4223     4224    +1     
  Misses       3783     3783           
  Partials      807      807           
Flag Coverage Δ
front ?
unit 47.92% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/core/admin/server/controllers/user.js 70.58% <100.00%> (+0.58%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b008326...91757fe. Read the comment docs.

alexandrebodin
alexandrebodin previously approved these changes May 13, 2022
@alexandrebodin alexandrebodin merged commit b2980ab into master May 13, 2022
@alexandrebodin alexandrebodin deleted the fix/invite-link-not-working branch May 13, 2022 14:54
@strapi-bot
Copy link

This pull request has been mentioned on Strapi Community Forum. There might be relevant details there:

https://forum.strapi.io/t/user-creation-registration-token-not-being-generated/19079/4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: fix This PR is fixing a bug source: core:admin Source is core/admin package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invite link not working

4 participants