Skip to content

Commit 88a55b3

Browse files
authored
DOC-8425 -- Revise Channels Documentation (#490)
https://issues.couchbase.com/browse/DOC-8425
1 parent 9f1a2d9 commit 88a55b3

14 files changed

+428
-89
lines changed

modules/ROOT/assets/attachments/sg.yaml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ properties:
277277
enable_star_channel:
278278
type: boolean
279279
description: |+
280-
Enable the star (*) channel.
280+
Enable the all documents (*) channel -- sometimes referred to as the 'star' channel.
281281
default: 'true'
282282
max_length:
283283
type: integer
@@ -612,9 +612,11 @@ properties:
612612
properties:
613613
admin_channels:
614614
type: array
615-
description: |
615+
description: |+
616616
The list of channels this role is automatically granted access to when Sync Gateway starts.
617-
If "*" is specified then the role is granted access to the star channel which contains all documents.
617+
618+
If you use the all channels wildcard ("*") the role is granted access to all channels and to all documents within all channels. This will be inherited by any user assigned this role.
619+
618620
items:
619621
type: string
620622
send_www_authenticate_header:
@@ -806,7 +808,11 @@ properties:
806808
description: The user's password.
807809
admin_channels:
808810
type: array
809-
description: The list of channels this user is automatically granted access to when Sync Gateway starts. If `"*"` is specified then the user is granted access to the [star channel](sync-gateway-channels.html#special-channels) which contains all documents.
811+
description: |+
812+
The list of channels this user is automatically granted access to when Sync Gateway starts.
813+
814+
If you use the all channels wildcard ("*") the user is granted access to all channels and to all documents within all channels -- see: [all channels wildcard](channels.html#lbl-all-channels).
815+
810816
items:
811817
type: string
812818
admin_roles:
@@ -1301,6 +1307,11 @@ properties:
13011307
These details are used to authenticate credentials and approve access to data
13021308
13031309
Once provided and recorded, the username data is redacted and will not be displayed in either the configuration file or Admin REST API. A string of `****` will be displayed in its place.
1310+
1311+
Replications initiated by this user will pull all documents in all channels the user has access grants for.
1312+
If the all channels wildcard was used to grant access then the sync will pull *ALL* documents.
1313+
Use a filter to avoid syncing excessive amounts of data to mobile devices.
1314+
13041315
facebook:
13051316
description: Configuration for Facebook Login authentication.
13061317
type: object

modules/ROOT/assets/attachments/sync-gateway-admin.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,7 +1478,7 @@ paths:
14781478
admin_channels:
14791479
type: array
14801480
description: |
1481-
The admin channels that this role has granted access to. Admin channels are the ones which were
1481+
The admin channels that this role has granted access to. Admin channels are the ones which are
14821482
granted access to in the config file or via the Admin REST API.
14831483
items:
14841484
type: string
@@ -2507,7 +2507,7 @@ definitions:
25072507
properties:
25082508
channels:
25092509
type: object
2510-
description: Key-value pairs with a channel name as the key and the sequence number that granted the user access to the channel as value. `!` is the public channel and every user has access to it.
2510+
description: Key-value pairs with a channel name as the key and the sequence number that granted the user access to the channel as value.Note that `!` is the public channel and every user has access to it.
25112511
name:
25122512
type: string
25132513
description: The user's name.

modules/ROOT/pages/_partials/_page-index.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ endif::xref--pfx-sgw[]
252252
:supported-environments--xref: {sgw--xref}{supported-environments--page}[Supported Environments]
253253
:sync-function--page: sync-function.adoc
254254
:sync-function--xref: {sgw--xref}{sync-function--page}[Sync Function]
255+
:sync-function--bmk-requireAcces: {sgw--xref}{sync-function--page}[Sync Function -- requireAccess()]
255256
:sync-inter-syncgateway-conflict-resolution--page: sync-inter-syncgateway-conflict-resolution.adoc
256257
:sync-inter-syncgateway-conflict-resolution--xref: {sgw--xref}{sync-inter-syncgateway-conflict-resolution--page}[Inter Sync Gateway Sync - Conflict Resolution]
257258
:sync-inter-syncgateway-manage--page: sync-inter-syncgateway-manage.adoc
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// BEGIN -- inclusion -- topic-group-access-control.adoc
2+
// Purpose:
3+
// Show the topic group, allowing easy cycle-through
4+
// Do not show current page as a click-through though
5+
// Container: /modules/ROOT/pages/_partials/
6+
7+
// BEGIN -- get the current calling page's name
8+
:this-page: {page-relative-src-path}
9+
// END -- get the current calling page's name
10+
11+
// Begin -- Define Local Attributes with Required Links and Titles for this topic group
12+
// Set titles for xrefs
13+
:title-1: Sync function
14+
:title-2: Read access
15+
:title-3: Write access
16+
// :title-4: Revisions
17+
// :title-5: Tombstones
18+
19+
20+
// Set the pages for the xrefs to link to (we are using attributes from _page-index.adoc here)
21+
:topic-1: {sync-function--page}
22+
:topic-2: {read-access--page}
23+
:topic-3: {write-access-page}
24+
// :topic-4: {revisions--page}
25+
// :topic-5: {what-are-tombstones--page}
26+
// Set the xrefs up using attribute from _page-index.adoc and above attributes
27+
:topic-1--xref: {sgw--xref}{topic-1}[{title-1}]
28+
:topic-2--xref: {sgw--xref}{topic-2}[{title-2}]
29+
:topic-3--xref: {sgw--xref}{topic-3}[{title-3}]
30+
// :topic-4--xref: {sgw--xref}{topic-4}[{title-4}]
31+
// :topic-5--xref: {sgw--xref}{topic-5}[{title-5}]
32+
// End -- Local Attributes
33+
34+
// Begin -- Remove the xref link from current calling page
35+
ifeval::["{this-page}"=="{topic-1}"]
36+
:topic-1--xref: pass:q,a[*{title-1}*]
37+
endif::[]
38+
39+
ifeval::["{this-page}"=="{topic-2}"]
40+
:topic-2--xref: {title-2}
41+
endif::[]
42+
43+
ifeval::["{this-page}"=="{topic-3}"]
44+
:topic-3--xref: {title-3}
45+
endif::[]
46+
47+
// ifeval::["{this-page}"=="{topic-4}"]
48+
// :topic-4--xref: {title-4}
49+
// endif::[]
50+
51+
// ifeval::["{this-page}"=="{topic-5}"]
52+
// :topic-5--xref: {title-5}
53+
// endif::[]
54+
// End -- Remove xref link from current page
55+
// Begin -- Output Block
56+
_Related {param-topic-group} topics_: {topic-1--xref} | {topic-2--xref} | {topic-3--xref} | {topic-4--xref} | {topic-5--xref}
57+
// End -- Output Block
58+
59+
// Begin -- Tidy-up
60+
:this-page!:
61+
:topic-1!:
62+
:topic-2!:
63+
:topic-3!:
64+
// :topic-4!:
65+
// :topic-5!:
66+
:title-1!:
67+
:title-2!:
68+
:title-3!:
69+
// :title-4!:
70+
// :title-5!:
71+
:topic-1--xref!:
72+
:topic-2--xref!:
73+
:topic-3--xref!:
74+
// :topic-4--xref!:
75+
// :topic-5--xref!:
76+
// End -- Tidy-up
77+
78+
// END -- inclusion -- content-group-configuration.adoc
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// BEGIN -- inclusion -- topic-group-concepts.adoc
2+
// Purpose:
3+
// Show the topic group, allowing easy cycle-through
4+
// Do not show current page as a click-through though
5+
// Container: /modules/ROOT/pages/_partials/
6+
7+
// BEGIN -- get the current calling page's name
8+
:this-page: {page-relative-src-path}
9+
// END -- get the current calling page's name
10+
11+
// Begin -- Define Local Attributes with Required Links and Titles for this topic group
12+
// Set titles for xrefs
13+
:title-1: Users
14+
:title-2: Roles
15+
:title-3: Channels
16+
:title-4: Revisions
17+
:title-5: Tombstones
18+
19+
20+
// Set the pages for the xrefs to link to (we are using attributes from _page-index.adoc here)
21+
:topic-1: {users--page}
22+
:topic-2: {roles--page}
23+
:topic-3: {channels--page}
24+
:topic-4: {revisions--page}
25+
:topic-5: {what-are-tombstones--page}
26+
27+
28+
// Set the xrefs up using attribute from _page-index.adoc and above attributes
29+
:topic-1--xref: {sgw--xref}{topic-1}[{title-1}]
30+
:topic-2--xref: {sgw--xref}{topic-2}[{title-2}]
31+
:topic-3--xref: {sgw--xref}{topic-3}[{title-3}]
32+
:topic-4--xref: {sgw--xref}{topic-4}[{title-4}]
33+
:topic-5--xref: {sgw--xref}{topic-5}[{title-5}]
34+
// End -- Local Attributes
35+
36+
// Begin -- Remove the xref link from current calling page
37+
ifeval::["{this-page}"=="{topic-1}"]
38+
:topic-1--xref: pass:q,a[*{title-1}*]
39+
endif::[]
40+
41+
ifeval::["{this-page}"=="{topic-2}"]
42+
:topic-2--xref: {title-2}
43+
endif::[]
44+
45+
ifeval::["{this-page}"=="{topic-3}"]
46+
:topic-3--xref: {title-3}
47+
endif::[]
48+
49+
ifeval::["{this-page}"=="{topic-4}"]
50+
:topic-4--xref: {title-4}
51+
endif::[]
52+
53+
ifeval::["{this-page}"=="{topic-5}"]
54+
:topic-5--xref: {title-5}
55+
endif::[]
56+
// End -- Remove xref link from current page
57+
// Begin -- Output Block
58+
_Related {param-topic-group} topics_: {topic-1--xref} | {topic-2--xref} | {topic-3--xref} | {topic-4--xref} | {topic-5--xref}
59+
// End -- Output Block
60+
61+
// Begin -- Tidy-up
62+
:this-page!:
63+
:topic-1!:
64+
:topic-2!:
65+
:topic-3!:
66+
:topic-4!:
67+
:topic-5!:
68+
:title-1!:
69+
:title-2!:
70+
:title-3!:
71+
:title-4!:
72+
:title-5!:
73+
:topic-1--xref!:
74+
:topic-2--xref!:
75+
:topic-3--xref!:
76+
:topic-4--xref!:
77+
:topic-5--xref!:
78+
// End -- Tidy-up
79+
80+
// END -- inclusion -- content-group-configuration.adoc

0 commit comments

Comments
 (0)