@@ -23,30 +23,6 @@ with the |charts-short| Embedding SDK.
23
23
24
24
- :ref:`embedding-charts`
25
25
26
- .. _inject-filter-per-user:
27
-
28
- Inject User-Specific Filters
29
- ----------------------------
30
-
31
- When you embed a chart requiring :guilabel:`Authenticated` access, you
32
- can use the :guilabel:`Inject Filter Per User` setting to inject a
33
- MongoDB filter document specific to each user who views
34
- the chart. The function has access to your Embedding Authentication
35
- Provider's token via ``context.token``, and can filter the chart data
36
- based on the token.
37
-
38
- This filter ensures that viewers of an embedded chart see only their
39
- own data, which is useful when embedding charts with potentially
40
- sensitive information.
41
-
42
- To inject a filter specific to each user, in the
43
- :guilabel:`Authenticated` tab of the the :guilabel:`Embed Chart`
44
- dialog, set the :guilabel:`Inject Filter Per User`
45
- setting to :guilabel:`On`. Specify a function and click
46
- :guilabel:`Save`.
47
-
48
- .. include:: /includes/example-user-filter-function.rst
49
-
50
26
.. _specify-filter-fields:
51
27
52
28
Specify Filterable Fields
@@ -266,3 +242,27 @@ which the ``total`` field is greater than ``100``:
266
242
height: 500,
267
243
filter: { "total": { "$gt": 100 } }
268
244
})
245
+
246
+ .. _inject-filter-per-user:
247
+
248
+ Inject User-Specific Filters
249
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
250
+
251
+ When you embed a chart that requires :guilabel:`Authenticated` access,
252
+ you can use the :guilabel:`Inject Filter Per User` setting to inject a
253
+ MongoDB filter document specific to each user who views
254
+ the chart. The function has access to your Embedding Authentication
255
+ Provider's token via ``context.token``, and can filter the chart data
256
+ based on the token.
257
+
258
+ This filter ensures that viewers of an embedded chart see only their
259
+ own data, which is useful when embedding charts with potentially
260
+ sensitive information.
261
+
262
+ To inject a filter specific to each user, in the
263
+ :guilabel:`Authenticated` tab of the the :guilabel:`Embed Chart`
264
+ dialog, set the :guilabel:`Inject Filter Per User`
265
+ setting to :guilabel:`On`. Specify a function and click
266
+ :guilabel:`Save`.
267
+
268
+ .. include:: /includes/example-user-filter-function.rst
0 commit comments