From b5f762fb5f8495a75a2d94f90a8ef5364161584e Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Thu, 26 Jan 2023 09:16:53 -0500 Subject: [PATCH] 19792: Simplify example for modifying permissions Arvados-DCO-1.1-Signed-off-by: Brett Smith --- doc/sdk/python/cookbook.html.textile.liquid | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/sdk/python/cookbook.html.textile.liquid b/doc/sdk/python/cookbook.html.textile.liquid index 598bdceeb8..4c38a49883 100644 --- a/doc/sdk/python/cookbook.html.textile.liquid +++ b/doc/sdk/python/cookbook.html.textile.liquid @@ -176,7 +176,7 @@ permission = arv_client.links().create( h3(#modify-permission). Modify permission on an object -To modify an existing permission—for example, to change its access level—find the existing link object for the permission, then update it with the new values you want. This example shows making all permissions on a specific collection read-only. Adjust the filters appropriately to find the permission(s) you want to modify. +To modify an existing permission—for example, to change its access level—find the existing link object for the permission, then update it with the new values you want. This example shows changing all read-write permissions on a specific collection to read-only. Adjust the filters appropriately to find the permission(s) you want to modify. {% codeblock as python %} import arvados.util @@ -187,11 +187,8 @@ for permission in arvados.util.keyset_list_all( # You should use this filter for all permission searches, # to exclude other kinds of links. ['link_class', '=', 'permission'], - # In this example, we do not want to *increase* the access level of - # no-permission links, and updating read-permission links would be a - # noop. Exclude both here. - ['name', 'not in', ['none', 'can_read']], # Add other filters as desired. + ['name', '=', 'can_write'], ['head_uuid', '=', 'zzzzz-4zz18-12345abcde67890'], ..., ], -- 2.30.2