Skip to content
Merged
Show file tree
Hide file tree
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
22 changes: 11 additions & 11 deletions modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@
** xref:access-control/channels.adoc[Channels]
** xref:access-control/roles.adoc[Roles]
** xref:access-control/users.adoc[Users]
* xref:access-control/sync-function-api/sync-function.adoc[Sync Function]
** xref:access-control/sync-function-api/sync-function-api.adoc[API Reference]
*** xref:access-control/sync-function-api/sync-function-api-access-cmd.adoc[access()]
*** xref:access-control/sync-function-api/sync-function-api-channel-cmd.adoc[channel()]
*** xref:access-control/sync-function-api/sync-function-api-expiry-cmd.adoc[expiry()]
*** xref:access-control/sync-function-api/sync-function-api-require-access-cmd.adoc[requireAccess()]
*** xref:access-control/sync-function-api/sync-function-api-require-admin-cmd.adoc[requireAdmin()]
*** xref:access-control/sync-function-api/sync-function-api-require-role-cmd.adoc[requireRole()]
*** xref:access-control/sync-function-api/sync-function-api-require-user-cmd.adoc[requireUser()]
*** xref:access-control/sync-function-api/sync-function-api-role-cmd.adoc[role()]
*** xref:access-control/sync-function-api/sync-function-api-throw-cmd.adoc[throw()]
* xref:access-control/sync-function/sync-function.adoc[Sync Function]
** xref:access-control/sync-function/sync-function-api.adoc[API Reference]
*** xref:access-control/sync-function/sync-function-api-access-cmd.adoc[access()]
*** xref:access-control/sync-function/sync-function-api-channel-cmd.adoc[channel()]
*** xref:access-control/sync-function/sync-function-api-expiry-cmd.adoc[expiry()]
*** xref:access-control/sync-function/sync-function-api-require-access-cmd.adoc[requireAccess()]
*** xref:access-control/sync-function/sync-function-api-require-admin-cmd.adoc[requireAdmin()]
*** xref:access-control/sync-function/sync-function-api-require-role-cmd.adoc[requireRole()]
*** xref:access-control/sync-function/sync-function-api-require-user-cmd.adoc[requireUser()]
*** xref:access-control/sync-function/sync-function-api-role-cmd.adoc[role()]
*** xref:access-control/sync-function/sync-function-api-throw-cmd.adoc[throw()]
* xref:access-control/access-control-how.adoc[How-to]
** xref:access-control/access-control-how-create-users.adoc[Create Users]
** xref:access-control/access-control-how-create-roles.adoc[Create Roles]
Expand Down
24 changes: 12 additions & 12 deletions modules/ROOT/pages/_partials/_define_page_index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -737,33 +737,33 @@ endif::xref--pfx-sgw[]
:supported-environments--page: supported-environments.adoc
:supported-environments--xref: {sgw--xref}{supported-environments--page}[Supported OS]

:sync-function-overview--page: access-control/sync-function-api/sync-function-overview.adoc
:sync-function-overview--page: access-control/sync-function/sync-function-overview.adoc
:sync-function-overview--xref: {sgw--xref}{sync-function-overview--page}[Sync Function Overview]
:sync-function--page: access-control/sync-function-api/sync-function.adoc
:sync-function--page: access-control/sync-function/sync-function.adoc
:sync-function--xref: {sgw--xref}{sync-function--page}[Sync Function]

:sync-function-api--page: access-control/sync-function-api/sync-function-api.adoc
:sync-function-api--page: access-control/sync-function/sync-function-api.adoc
:sync-function-api--xref: {sgw--xref}{sync-function-api--page}[Sync Function API]



:sync-function-api-access-cmd--page: access-control/sync-function-api/sync-function-api-access-cmd.adoc
:sync-function-api-access-cmd--page: access-control/sync-function/sync-function-api-access-cmd.adoc
:sync-function-api-access-cmd--xref: {sgw--xref}{sync-function-api-access-cmd--page}[access()]
:sync-function-api-channel-cmd--page: access-control/sync-function-api/sync-function-api-channel-cmd.adoc
:sync-function-api-channel-cmd--page: access-control/sync-function/sync-function-api-channel-cmd.adoc
:sync-function-api-channel-cmd--xref: {sgw--xref}{sync-function-api-channel-cmd--page}[channel()]
:sync-function-api-expiry-cmd--page: access-control/sync-function-api/sync-function-api-expiry-cmd.adoc
:sync-function-api-expiry-cmd--page: access-control/sync-function/sync-function-api-expiry-cmd.adoc
:sync-function-api-expiry-cmd--xref: {sgw--xref}{sync-function-api-expiry-cmd--page}[expiry()]
:sync-function-api-require-access-cmd--page: access-control/sync-function-api/sync-function-api-require-access-cmd.adoc
:sync-function-api-require-access-cmd--page: access-control/sync-function/sync-function-api-require-access-cmd.adoc
:sync-function-api-require-access-cmd--xref: {sgw--xref}{sync-function-api-require-access-cmd--page}[requireAccess()]
:sync-function-api-require-admin-cmd--page: access-control/sync-function-api/sync-function-api-require-admin-cmd.adoc
:sync-function-api-require-admin-cmd--page: access-control/sync-function/sync-function-api-require-admin-cmd.adoc
:sync-function-api-require-admin-cmd--xref: {sgw--xref}{sync-function-api-require-admin-cmd--page}[requireAdmin()]
:sync-function-api-require-role-cmd--page: access-control/sync-function-api/sync-function-api-require-role-cmd.adoc
:sync-function-api-require-role-cmd--page: access-control/sync-function/sync-function-api-require-role-cmd.adoc
:sync-function-api-require-role-cmd--xref: {sgw--xref}{sync-function-api-require-role-cmd--page}[requireRole()]
:sync-function-api-require-user-cmd--page: access-control/sync-function-api/sync-function-api-require-user-cmd.adoc
:sync-function-api-require-user-cmd--page: access-control/sync-function/sync-function-api-require-user-cmd.adoc
:sync-function-api-require-user-cmd--xref: {sgw--xref}{sync-function-api-require-user-cmd--page}[requireUser()]
:sync-function-api-role-cmd--page: access-control/sync-function-api/sync-function-api-role-cmd.adoc
:sync-function-api-role-cmd--page: access-control/sync-function/sync-function-api-role-cmd.adoc
:sync-function-api-role-cmd--xref: {sgw--xref}{sync-function-api-role-cmd--page}[role()]
:sync-function-api-throw-cmd--page: access-control/sync-function-api/sync-function-api-throw-cmd.adoc
:sync-function-api-throw-cmd--page: access-control/sync-function/sync-function-api-throw-cmd.adoc
:sync-function-api-throw-cmd--xref: {sgw--xref}{sync-function-api-throw-cmd--page}[throw()]
// :sync-function-api-require-channel: {sgw--xref}{sync-function-api--page}#lbl-require-channel[requireChannel()role]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Blog Entries
// tag::concept-syncfunc[]
* xref:configuration/configuration-schema-access-control.adoc[Access Control]
* xref:rest_api_admin.adoc#tag/Database-Configuration/operation/put_keyspace-_config-sync[Add/Update Sync Function]
* xref:access-control/sync-function-api/sync-function-overview.adoc[Sync Function Overview]
* xref:access-control/sync-function/sync-function-overview.adoc[Sync Function Overview]
// end::concept-syncfunc[]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ This grants access to the specified channel(s) for all users assigned that role.

The effects of all access calls by all active documents are effectively combined in a union, so if _any_ document grants a user access to a channel, that user has access to the channel.

You can use the _all channels_ wildcard ('***') to grant the user access to all documents in all channels.
NOTE: The sync function `access()` call does not support the wildcard ('***') for granting access to all channels.
To grant a user access to all channels, use the REST API channel grant endpoint.

== Use

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ This example covers a configuration with 1 custom Scope and 2 custom Collections
| |
| collection1 | The name of the first collection within `scope1`.
| sync | The sync function associated with `collection1`. This function is triggered when a document is created or updated in the collection. This code example illustrates a specific use case for sync functions.
For more information, see xref:access-control/sync-function-api/sync-function.adoc[Sync Functions].
For more information, see xref:access-control/sync-function/sync-function.adoc[Sync Functions].
| | The sync function checks if the `type` field of the document is not `default`. If it's not, it throws a `forbidden` error, rejecting the document.
| | After the rejection, it sends a message to the `legacy` channel.
| import_filter | The import filter function associated with `collection1`. This function is used when importing documents into the collection.
Expand All @@ -107,7 +107,7 @@ For more information, see xref:import-filter.adoc[Import Filters].
| |
| collection2 | The name of the second collection within `scope1`.
| sync | The sync function associated with `collection2`. This function is triggered when a document is created or updated in the collection.
For more information, see xref:access-control/sync-function-api/sync-function.adoc[Sync Functions].
For more information, see xref:access-control/sync-function/sync-function.adoc[Sync Functions].
| | The sync function sends a message to the `collection1` channel.
| import_filter | The import filter function associated with `collection2`. This function is used when importing documents into the collection.
For more information, see xref:import-filter.adoc[Import Filters].
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ It serves as the synchronization server in a Couchbase Mobile deployment, enabli
* Data Sync
** xref:sync/sync-with-couchbase-server.adoc[Sync with Server]
** xref:sync/sync-using-app.adoc[Sync with Application]
** xref:access-control/sync-function-api/sync-function.adoc[Sync Function]
** xref:access-control/sync-function/sync-function.adoc[Sync Function]
** xref:import-filter.adoc[Import Filter]

* Inter Sync Gateway Sync
Expand Down
4 changes: 2 additions & 2 deletions modules/ROOT/pages/introduction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ xref:access-control/users.adoc[Users], xref:access-control/roles.adoc[Roles] and
* *Data Routing*, which ensures that authorized users can only access documents in those xref:access-control/channels.adoc[Channels] assigned to them and only in accordance with their assigned privileges.
You can set those privileges to confer xref:access-control/access-control-how-control-document-access.adoc#lbl-read-access[Read Access] and-or xref:access-control/access-control-how-control-document-access.adoc#lbl-write-access[Write Access] as required.

The business logic behind the validation and authorization of document access is provided by the customizable xref:access-control/sync-function-api/sync-function.adoc[Sync Function].
The business logic behind the validation and authorization of document access is provided by the customizable xref:access-control/sync-function/sync-function.adoc[Sync Function].

== Why Use Sync Gateway?

Expand Down Expand Up @@ -105,7 +105,7 @@ Implement comprehensive security measures to protect your data and control acces
Configure fine-grained access control with users, roles, channels, and sync functions.

* xref:access-control/access-control-concepts.adoc[]
* xref:access-control/sync-function-api/sync-function.adoc[]
* xref:access-control/sync-function/sync-function.adoc[]
* xref:access-control/access-control-how.adoc[How to]
* xref:access-control/auto-purge-channel-access-revocation.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/sync/import-processing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ image::shared-bucket-access.png[]

== Operation

Any non-{sgw} change is eligible for import. For more information, refer to the xref:access-control/sync-function-api/sync-function.adoc[Sync Function] documentation.
Any non-{sgw} change is eligible for import. For more information, refer to the xref:access-control/sync-function/sync-function.adoc[Sync Function] documentation.

The document is first run through the Sync Function to compute read security and routing, with the following differences:

Expand Down