Skip to content

Conversation

@alexandrebodin alexandrebodin added source: plugin:users-permissions Source is plugin/users-permissions package pr: fix This PR is fixing a bug labels May 31, 2022
@alexandrebodin
Copy link
Member Author

@WalkingPizza If you can have a look here that would be awesome !

@codecov
Copy link

codecov bot commented May 31, 2022

Codecov Report

Merging #13435 (8da88a7) into master (87abe1b) will not change coverage.
The diff coverage is n/a.

❗ Current head 8da88a7 differs from pull request most recent head 3b6e629. Consider uploading reports for the commit 3b6e629 to get more accurate results

@@           Coverage Diff           @@
##           master   #13435   +/-   ##
=======================================
  Coverage   54.25%   54.25%           
=======================================
  Files        1198     1198           
  Lines       30601    30601           
  Branches     5565     5565           
=======================================
  Hits        16603    16603           
  Misses      12178    12178           
  Partials     1820     1820           
Flag Coverage Δ
front 56.60% <ø> (ø)
unit 48.55% <ø> (ø)

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

Impacted Files Coverage Δ
...s/admin/src/pages/AdvancedSettings/utils/layout.js 100.00% <ø> (ø)

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 87abe1b...3b6e629. Read the comment docs.

@alexandrebodin alexandrebodin marked this pull request as draft June 1, 2022 07:01
@alexandrebodin alexandrebodin changed the title Fix users-permissions username vs email conflict on registration & login Address multiple userds & permissions issues Jun 1, 2022
@derrickmehaffy
Copy link
Member

Patch files for patch-package based on f7f9ecc
patches.zip

@derrickmehaffy
Copy link
Member

derrickmehaffy commented Jun 1, 2022

Testing the following based on f7f9ecc

@alexandrebodin alexandrebodin changed the title Address multiple userds & permissions issues Address multiple users & permissions issues Jun 1, 2022
@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/users-me-is-not-returning-relation-field-of-type-belong-to-many/3911/5

@derrickmehaffy
Copy link
Member

Sorry @alexandrebodin didn't get a chance to test this before, I'll try testing tmrw when I'm at coworking space for the docs side

@derrickmehaffy
Copy link
Member

@WalkingPizza / @Convly if both of you could test before next wednesday we might be able to squeeze this into 4.2 release but Alex wants at least one Strapi engineer to review.

Maybe if @petersg83 gets some time if JS doesn't?

@derrickmehaffy derrickmehaffy marked this pull request as ready for review June 7, 2022 09:33
@derrickmehaffy derrickmehaffy requested a review from petersg83 June 7, 2022 09:33
@WalkingPizza
Copy link
Contributor

Haven't had the chance to test anything yet, but I noticed we are still relying on the Query Engine API for most operations in the U&P controllers.

Since quite a lot of things have been changed, should we also switch to the Entity Service API while we are at it?

@derrickmehaffy
Copy link
Member

Haven't had the chance to test anything yet, but I noticed we are still relying on the Query Engine API for most operations in the U&P controllers.

Since quite a lot of things have been changed, should we also switch to the Entity Service API while we are at it?

😅 This is something I brought up internally and with @iicdii too and I think we decided to do as little modification as possible to just make sure stuff works without fundamentally rewriting/refactoring the plugin.

Soon (tm), and with a TBD date we plan to replace this plugin with a new one that will allow us to deprecate this one as we don't implement breaking changes that require us to bump this package to v5.x.x.

@derrickmehaffy derrickmehaffy added this to the 4.2.0 milestone Jun 7, 2022
@alexandrebodin
Copy link
Member Author

@WalkingPizza anywhere specific you think we would benefit from the entityService? I'll have a look

@fingeg
Copy link
Contributor

fingeg commented Jun 13, 2022

While this fixes the population problem of the /me request, it doesn't address it in the login response:

const user = await strapi.query('plugin::users-permissions.user').findOne({

has no option to populate a user, was using nested collections in the old version with MongoDB, and would be great if I could use it in the new version, too.

Any thoughts on this?

Copy link
Member

@derrickmehaffy derrickmehaffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexandrebodin alexandrebodin merged commit 8c91210 into master Jun 28, 2022
@alexandrebodin alexandrebodin deleted the fix/up-fixes branch June 28, 2022 15:24
@Convly Convly modified the milestones: 4.2.1, 4.2.2 Jun 29, 2022
@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/new-release-strapi-v4-2-2/19927/1

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: plugin:users-permissions Source is plugin/users-permissions package

Projects

None yet

7 participants