Skip to content

Commit

Permalink
Reword sudo() documentation to remove ambiguity (#8801)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens authored Sep 8, 2023
1 parent a01952d commit 6a8622e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/pages/docs/context/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ See the [session API](../config/session#session-context) for more details.
When using the `context.query`, `context.graphql.run`, and `context.graphql.raw` APIs, access control and session information is passed through to these calls from the `context` object.
The following functions will create a new `Context` object with this behaviour modified.

`sudo()`: A function which returns a new elevated `Context` object with all access control disabled and all filters enabled for subsequent API calls.
`sudo()`: A function which returns a new `Context` object with access control limitations removed, bypassing your `access` control configuration.

`withRequest(req, res)`: A function which returns a new user `Context` object with a session and access control based on the `req` given.
`withRequest(req, res)`: A function which returns a new `Context` object with the `.session` determined by your `sessionStrategy.get` function.

`withSession(newSession)`: A function which returns a new `Context` object with the `.session` object replaced with `newSession`.
`withSession(newSession)`: A function which returns a new `Context` object with the `.session` object replaced by the `newSession` argument.

### Database access

Expand Down

0 comments on commit 6a8622e

Please sign in to comment.