Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about finding default authenticated role #7

Closed
rndexe opened this issue Jun 29, 2022 · 2 comments
Closed

Question about finding default authenticated role #7

rndexe opened this issue Jun 29, 2022 · 2 comments

Comments

@rndexe
Copy link

rndexe commented Jun 29, 2022

Hi,

I've been facing a weird intermittent issue where sometimes the newly created user get assigned a Public role instead of Authenticated role despite never changing the setting in User-Permissions.
I haven't been able to reliably reproduce it but I suspect it is this line

.findOne({type: userSettings.default_role}, []);

Is this syntax supported in v4? Should the params be an object as given in the docs at

https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/query-engine/single-operations.html#findone

findOne( {  
    where : { type : userSettings.default_role }  
})

Please let me know if this is intended or am I missing something. Thank you.

@kucherenko
Copy link
Owner

thank you for the report, will fix it

@kucherenko
Copy link
Owner

The issue has been fixed at strapi-plugin-passwordless@4.0.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants