From 5c48799419f1caf0570314b652b6e6dbb4524020 Mon Sep 17 00:00:00 2001 From: Fortune Ikechi Date: Tue, 12 Aug 2025 15:22:18 +0100 Subject: [PATCH 1/3] updated to add access function role --- .../pages/_partials/sync-api/sync-function-api-access.adoc | 3 +++ 1 file changed, 3 insertions(+) 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 d444bfb3..7312d178 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,6 +32,9 @@ 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. +The `access()` function grants access to users or roles that do not yet exist. +When you create such users or define roles later, the previous granted access permissions automatically apply to them. + 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. From 984298fb731af5c1dd5f79229879f7d4b8c8706a Mon Sep 17 00:00:00 2001 From: Fortune Ikechi Date: Tue, 12 Aug 2025 15:27:48 +0100 Subject: [PATCH 2/3] remove automatically --- .../ROOT/pages/_partials/sync-api/sync-function-api-access.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 7312d178..8019952a 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 @@ -33,7 +33,7 @@ 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. The `access()` function grants access to users or roles that do not yet exist. -When you create such users or define roles later, the previous granted access permissions automatically apply to them. +When you create such users or define roles later, the previous granted access permissions apply to them. 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. From a83218e8a22eb9bd1264872bbe5175e02c04b7e3 Mon Sep 17 00:00:00 2001 From: Fortune Ikechi Date: Tue, 12 Aug 2025 16:42:53 +0100 Subject: [PATCH 3/3] updated to comply with style guide --- .../pages/_partials/sync-api/sync-function-api-access.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 8019952a..14001c9c 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 @@ -30,10 +30,10 @@ You can invoke this function multiple times from within your Sync Function. TIP: Prefix the `username` argument value with `role:` to apply this function to a role rather than a user. 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. +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. The `access()` function grants access to users or roles that do not yet exist. -When you create such users or define roles later, the previous granted access permissions apply to them. +When you create new users or define roles later, the previous granted access permissions apply to them. 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.