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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug Report: Generated app - gqlUserRoles.decorator.ts fails for public queries #2268

Closed
yuval-hazaz opened this issue Feb 4, 2022 · 1 comment 路 Fixed by #2344
Closed
Assignees
Milestone

Comments

@yuval-hazaz
Copy link
Member

What happened?

The decorator gqlUserRoles.decorator.ts does not check for the existence of the user on the request and fails when there is no user in context

What you expected to happen

The decorator should return null or an empty array when there is no user in context

How to reproduce

See #2006

Amplication version

0.11.2

Environment

No response

Are you willing to submit PR?

No response

@tupe12334
Copy link
Contributor

tupe12334 commented Feb 20, 2022

This solution build from 2 steps

  • update our use of the user roles for use only nest access control package

(i did that in the #2325 pr)

  • update the nest access control package with the logic the prevent crashes

(i did that in nestjsx/nest-access-control#71 pr, wait for approval)

@tupe12334 tupe12334 linked a pull request Feb 20, 2022 that will close this issue
2 tasks
This was referenced Feb 20, 2022
@tupe12334 tupe12334 linked a pull request Feb 22, 2022 that will close this issue
@mshidlov mshidlov removed a link to a pull request Feb 22, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants