Skip to content

Commit

Permalink
docs: USER_CONTEXT update
Browse files Browse the repository at this point in the history
  • Loading branch information
igorlukanin authored and ovr committed Sep 12, 2024
1 parent 2796eb5 commit 43f6a60
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
13 changes: 11 additions & 2 deletions DEPRECATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ features:
| Deprecated | [`checkAuthMiddleware`](#checkauthmiddleware) | v0.26.0 | v0.36.0 |
| Removed | [Node.js 10](#nodejs-10) | v0.26.0 | v0.29.0 |
| Removed | [Node.js 15](#nodejs-15) | v0.26.0 | v0.32.0 |
| Deprecated | [`USER_CONTEXT`](#user_context) | v0.26.0 | |
| Deprecated | [`USER_CONTEXT`](#user_context) | v0.26.0 | v0.36.0 |
| Deprecated | [`authInfo`](#authinfo) | v0.26.0 | |
| Deprecated | [Prefix Redis environment variables with `CUBEJS_`](#prefix-redis-environment-variables-with-cubejs_) | v0.27.0 | v0.36.0 |
| Removed | [Node.js 12](#nodejs-12) | v0.29.0 | v0.32.0 |
Expand All @@ -56,6 +56,7 @@ features:
| Removed | [Serverless Deployments](#serverless-deployments) | v0.31.64 | v0.35.0 |
| Removed | [Node.js 14](#nodejs-14) | v0.32.0 | v0.35.0 |
| Removed | [Using Redis for in-memory cache and queue](#using-redis-for-in-memory-cache-and-queue) | v0.32.0 | v0.36.0 |
| Deprecated | [`SECURITY_CONTEXT`](#security_context) | v0.33.0 | |
| Deprecated | [`running_total` measure type](#running_total-measure-type) | v0.33.39 | |
| Removed | [Node.js 16](#nodejs-16) | v0.35.0 | v0.36.0 |
| Removed | [MySQL-based SQL API](#mysql-based-sql-api) | v0.35.0 | v0.35.0 |
Expand Down Expand Up @@ -205,7 +206,7 @@ no more updates. Please upgrade to Node.js 12 or higher.

### `USER_CONTEXT`

**Deprecated in Release: v0.26.0**
**Removed in Release: v0.36.0**

`USER_CONTEXT` has been renamed to `SECURITY_CONTEXT`.

Expand Down Expand Up @@ -337,6 +338,14 @@ Cube Store is now the default cache and queue engine, [replacing
Redis](https://cube.dev/blog/replacing-redis-with-cube-store). Please migrate to
[Cube Store](https://cube.dev/blog/how-you-win-by-using-cube-store-part-1).
### `SECURITY_CONTEXT`
**Deprecated in Release: v0.33.0**
The `SECURITY_CONTEXT` context variable is deprecated. Use
[`query_rewrite`](https://cube.dev/docs/reference/configuration/config#query_rewrite)
instead.
### `running_total` measure type
**Deprecated in Release: v0.33.39**
Expand Down
3 changes: 1 addition & 2 deletions docs/pages/reference/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ practices._
### Usage

```bash{promptUser: user}
npx cubejs-cli token -e TOKEN-EXPIRY -s SECRET -p FOO=BAR -u BAZ=QUX
npx cubejs-cli token -e TOKEN-EXPIRY -s SECRET -p FOO=BAR
```

### Flags
Expand All @@ -115,7 +115,6 @@ npx cubejs-cli token -e TOKEN-EXPIRY -s SECRET -p FOO=BAR -u BAZ=QUX
| -e, --expiry           | Token expiry. Set to 0 for no expiry (default: "30 days") | `1 day`, `30 days`         |
| -s, --secret | Cube app secret. Also can be set via environment variable `CUBEJS_API_SECRET` | - |
| -p, --payload | Token Payload | `foo=bar`, `userId=2` |
| -u, --user-context | Token USER_CONTEXT Payload | `baz=qux`, `companyId=5` |

### Example

Expand Down
4 changes: 2 additions & 2 deletions docs/pages/reference/data-model/context-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ cube(`users`, {
<WarningBox>
`SECURITY_CONTEXT` is deprecated and may be removed in the upcoming versions.
Use [`queryRewrite`][ref-config-queryrewrite] instead.
Use [`query_rewrite`][ref-config-queryrewrite] instead.
</WarningBox>
Expand Down Expand Up @@ -809,7 +809,7 @@ cube(`orders`, {
```
[ref-config-ext-ctx]: /reference/configuration/config#extendcontext
[ref-config-queryrewrite]: /reference/configuration/config#queryrewrite
[ref-config-queryrewrite]: /reference/configuration/config#query_rewrite
[ref-config-req-ctx]: /reference/configuration/config#requestcontext
[ref-recipe-control-access-cubes-views]:
/guides/recipes/access-control/controlling-access-to-cubes-and-views
Expand Down

0 comments on commit 43f6a60

Please sign in to comment.