Skip to content

Sync with main repo @ 9fe39d8e#11

Open
blitzjs-bot wants to merge 58 commits intomainfrom
sync-9fe39d8e
Open

Sync with main repo @ 9fe39d8e#11
blitzjs-bot wants to merge 58 commits intomainfrom
sync-9fe39d8e

Conversation

@blitzjs-bot
Copy link
Contributor

This PR was automatically generated.

Merge changes from blitzjs.com at 9fe39d8

The following files have conflicts and may need new translations:

Please fix the conflicts by pushing new commits to this pull request, either by editing the files directly on GitHub or by checking out this branch.

DO NOT SQUASH MERGE THIS PULL REQUEST!

Doing so will "erase" the commits from main and cause them to show up as conflicts the next time we merge.

JuanM04 and others added 30 commits April 19, 2021 08:04
* typo fix

Small typo fix:
you'll need to do the
chech
=>
you'll need to do the
check

* Update session.create > session.$create

* Update api routes doc examples - no anon exports

* Edit preview mode doc examples - no anon exports

* Change export name to handler

* Change export name to handler
Co-authored-by: Brandon Bayer <b@bayer.ws>
Co-authored-by: Brandon Bayer <b@bayer.ws>
This commit is rather simple. It simply makes the scrolling when you scroll by id much smoother. For example, when you use the Back to top button in the footer, it won't jump up so quickly, it'll instead scroll. This is useful because it will surprise people less and it'll seem cleaner and less choppy too.
abuuzayr and others added 28 commits May 6, 2021 11:15
Co-authored-by: JuanM04 <me@juanm04.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>
* typo fix

Small typo fix:
you'll need to do the
chech
=>
you'll need to do the
check

* Update session.create > session.$create

* Update api routes doc examples - no anon exports

* Edit preview mode doc examples - no anon exports

* Change export name to handler

* Change export name to handler

* lazy load random contributor images

* lazy load appropriate player, url

* switch to Image tag

* fix image sizing

* change user track image to github url

* make layout intrinsic

Co-authored-by: Roshan Manuel <Roshan,manuel@angelic-group.com>
Co-authored-by: Roshan Manuel <Roshan,manuel@angelic-group.com>
If you try to copy-paste the examples there's a missing import
When you impersonate another use it would be a good idea to assumer their role too.

Most endpoints will be protected with some for of authorizer e.g. `resolver.authorize("seller")` or `resolver.authorize("buyer")`. 
If you try and invoke these endpoints as an admin, they all need to be changed to `resolver.authorize(["seller", "admin"])` or `resolver.authorize(["buyer", "admin"])` etc.

If you assume the role of the user you're impersonating, you don't need to change anything.

In terms of security: 
- `startImpersonating` should only be available to admins, so it should be secured with `resolver.authorize("admin")`.
- we can allow `stopImpersonating` to be called without a role restriction as it is: the code already checks if `impersonatingFromUserId` is present in the session. If present, the user simply regains whatever role they had before ("admin", "support", etc), otherwise the endpoint is no-op.
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

Successfully merging this pull request may close these issues.