diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index 294ff923f..ccf086adb 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -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] diff --git a/modules/ROOT/pages/_partials/_define_page_index.adoc b/modules/ROOT/pages/_partials/_define_page_index.adoc index 0ec6703cb..45faac41f 100644 --- a/modules/ROOT/pages/_partials/_define_page_index.adoc +++ b/modules/ROOT/pages/_partials/_define_page_index.adoc @@ -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] diff --git a/modules/ROOT/pages/_partials/block_related_content_menulists.adoc b/modules/ROOT/pages/_partials/block_related_content_menulists.adoc index c1930aff0..2576464b5 100644 --- a/modules/ROOT/pages/_partials/block_related_content_menulists.adoc +++ b/modules/ROOT/pages/_partials/block_related_content_menulists.adoc @@ -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[] diff --git a/modules/ROOT/pages/_partials/sync-api/sync-function-api-access.adoc b/modules/ROOT/pages/_partials/sync-api/sync-function-api-access.adoc index d59ae9ed3..d444bfb3f 100644 --- a/modules/ROOT/pages/_partials/sync-api/sync-function-api-access.adoc +++ b/modules/ROOT/pages/_partials/sync-api/sync-function-api-access.adoc @@ -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 diff --git a/modules/ROOT/pages/access-control/sync-function-api/sync-function-api-access-cmd.adoc b/modules/ROOT/pages/access-control/sync-function/sync-function-api-access-cmd.adoc similarity index 100% rename from modules/ROOT/pages/access-control/sync-function-api/sync-function-api-access-cmd.adoc rename to modules/ROOT/pages/access-control/sync-function/sync-function-api-access-cmd.adoc diff --git a/modules/ROOT/pages/access-control/sync-function-api/sync-function-api-channel-cmd.adoc b/modules/ROOT/pages/access-control/sync-function/sync-function-api-channel-cmd.adoc similarity index 100% rename from modules/ROOT/pages/access-control/sync-function-api/sync-function-api-channel-cmd.adoc rename to modules/ROOT/pages/access-control/sync-function/sync-function-api-channel-cmd.adoc diff --git a/modules/ROOT/pages/access-control/sync-function-api/sync-function-api-expiry-cmd.adoc b/modules/ROOT/pages/access-control/sync-function/sync-function-api-expiry-cmd.adoc similarity index 100% rename from modules/ROOT/pages/access-control/sync-function-api/sync-function-api-expiry-cmd.adoc rename to modules/ROOT/pages/access-control/sync-function/sync-function-api-expiry-cmd.adoc diff --git a/modules/ROOT/pages/access-control/sync-function-api/sync-function-api-require-access-cmd.adoc b/modules/ROOT/pages/access-control/sync-function/sync-function-api-require-access-cmd.adoc similarity index 100% rename from modules/ROOT/pages/access-control/sync-function-api/sync-function-api-require-access-cmd.adoc rename to modules/ROOT/pages/access-control/sync-function/sync-function-api-require-access-cmd.adoc diff --git a/modules/ROOT/pages/access-control/sync-function-api/sync-function-api-require-admin-cmd.adoc b/modules/ROOT/pages/access-control/sync-function/sync-function-api-require-admin-cmd.adoc similarity index 100% rename from modules/ROOT/pages/access-control/sync-function-api/sync-function-api-require-admin-cmd.adoc rename to modules/ROOT/pages/access-control/sync-function/sync-function-api-require-admin-cmd.adoc diff --git a/modules/ROOT/pages/access-control/sync-function-api/sync-function-api-require-role-cmd.adoc b/modules/ROOT/pages/access-control/sync-function/sync-function-api-require-role-cmd.adoc similarity index 100% rename from modules/ROOT/pages/access-control/sync-function-api/sync-function-api-require-role-cmd.adoc rename to modules/ROOT/pages/access-control/sync-function/sync-function-api-require-role-cmd.adoc diff --git a/modules/ROOT/pages/access-control/sync-function-api/sync-function-api-require-user-cmd.adoc b/modules/ROOT/pages/access-control/sync-function/sync-function-api-require-user-cmd.adoc similarity index 100% rename from modules/ROOT/pages/access-control/sync-function-api/sync-function-api-require-user-cmd.adoc rename to modules/ROOT/pages/access-control/sync-function/sync-function-api-require-user-cmd.adoc diff --git a/modules/ROOT/pages/access-control/sync-function-api/sync-function-api-role-cmd.adoc b/modules/ROOT/pages/access-control/sync-function/sync-function-api-role-cmd.adoc similarity index 100% rename from modules/ROOT/pages/access-control/sync-function-api/sync-function-api-role-cmd.adoc rename to modules/ROOT/pages/access-control/sync-function/sync-function-api-role-cmd.adoc diff --git a/modules/ROOT/pages/access-control/sync-function-api/sync-function-api-throw-cmd.adoc b/modules/ROOT/pages/access-control/sync-function/sync-function-api-throw-cmd.adoc similarity index 100% rename from modules/ROOT/pages/access-control/sync-function-api/sync-function-api-throw-cmd.adoc rename to modules/ROOT/pages/access-control/sync-function/sync-function-api-throw-cmd.adoc diff --git a/modules/ROOT/pages/access-control/sync-function-api/sync-function-api.adoc b/modules/ROOT/pages/access-control/sync-function/sync-function-api.adoc similarity index 100% rename from modules/ROOT/pages/access-control/sync-function-api/sync-function-api.adoc rename to modules/ROOT/pages/access-control/sync-function/sync-function-api.adoc diff --git a/modules/ROOT/pages/access-control/sync-function-api/sync-function.adoc b/modules/ROOT/pages/access-control/sync-function/sync-function.adoc similarity index 100% rename from modules/ROOT/pages/access-control/sync-function-api/sync-function.adoc rename to modules/ROOT/pages/access-control/sync-function/sync-function.adoc diff --git a/modules/ROOT/pages/configuration/scopes-and-collections-config.adoc b/modules/ROOT/pages/configuration/scopes-and-collections-config.adoc index 6e3f05fd1..b0bd6cea3 100644 --- a/modules/ROOT/pages/configuration/scopes-and-collections-config.adoc +++ b/modules/ROOT/pages/configuration/scopes-and-collections-config.adoc @@ -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. @@ -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]. diff --git a/modules/ROOT/pages/index.adoc b/modules/ROOT/pages/index.adoc index e1f963e6e..293cef057 100644 --- a/modules/ROOT/pages/index.adoc +++ b/modules/ROOT/pages/index.adoc @@ -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 diff --git a/modules/ROOT/pages/introduction.adoc b/modules/ROOT/pages/introduction.adoc index d87c16620..accc84081 100644 --- a/modules/ROOT/pages/introduction.adoc +++ b/modules/ROOT/pages/introduction.adoc @@ -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? @@ -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[] diff --git a/modules/ROOT/pages/sync/import-processing.adoc b/modules/ROOT/pages/sync/import-processing.adoc index f09317763..8e17dc20f 100644 --- a/modules/ROOT/pages/sync/import-processing.adoc +++ b/modules/ROOT/pages/sync/import-processing.adoc @@ -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: