Repository navigation
Conversation
delete_default_permission only accepted one PermissionsRule, so a caller with several default rules had to delete them one at a time. It now accepts a list, matching PermissionsEndpoint.delete.
|
Thanks for this, @ranjithguggilla. Accepting a list of rules matches what #783 asks for. A couple of changes are needed. Please fix: docstrings (
Please fix: test the databases method The list path is tested only through Drafted with AI assistance (Claude); reviewed and posted by Jac. |
The Parameters sections still described a single PermissionsRule. Each delete method now says it takes one rule or a sequence, and that a failed DELETE leaves the earlier rules already removed. Databases gets the same note and a list test.
|
The Parameters section on each project
|
Closes #783
Motivation
PermissionsEndpoint.deleteaccepts one rule or a list.delete_default_permissionaccepted only onePermissionsRule, so a caller with several default rules had to delete them one at a time. Jac Fitzgerald asked for the same list behavior as the regular delete method.Behavior change
delete_workbook_default_permissionsand the other default-permission delete methods, includingDatabases.delete_table_default_permissions, accept a list of rules as well as a single rule. Passing one rule behaves as before. Each capability is still its own DELETE, which is what the REST API supports. If one DELETE fails partway through the list, the earlier rules are already deleted. The parameter name staysrule, so existing keyword callers stay valid.Test plan
test_delete_workbook_default_permissions_accepts_a_listdeletes two group rules and checks that both DELETE requests are sent.test_delete_table_default_permissions_accepts_a_listdoes the same for a database. The existing single-rule project test still passes.Not covered: a call against a live Tableau Server.