Skip to content

Commit 2ce66b3

Browse files
committed
simplify docs. Add note about silently ignoring perms not found
1 parent c3261ed commit 2ce66b3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/posit/connect/permissions.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,20 +152,21 @@ def get(self, uid: str) -> Permission:
152152
def destroy(self, *permissions: str | Group | User | Permission) -> list[Permission]:
153153
"""Remove supplied content item permissions.
154154
155-
Removes all provided permissions from the content item's permissions.
155+
Removes all provided permissions from the content item's permissions. If a permission isn't
156+
found, it is silently ignored.
156157
157158
Parameters
158159
----------
159160
*permissions : str | Group | User | Permission
160161
The content item permissions to remove. If a `str` is received, it is compared against
161-
the Permissions' `principal_guid`. If a `Group`, `User`, or `Permission` is received,
162-
the `guid` is used and compared against the Permissions' `principal_guid`. If a
163-
`Permission` is received, the `principal_guid` is used. Note, only the associated permissions will be destroyed; Any users or groups provided will remain.
162+
the `Permissions`' `principal_guid`. If a `Group` or `User` is received, the associated
163+
`Permission` will be removed.
164164
165165
Returns
166166
-------
167167
list[Permission]
168-
The deleted permissions.
168+
The removed permissions. If a permission is not found, it is not included in the
169+
returned list.
169170
170171
Examples
171172
--------

0 commit comments

Comments
 (0)