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

Reword sudo() documentation to remove ambiguity #8801

Merged
merged 3 commits into from
Sep 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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