You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Delete default permissions does not take in a list #783
Regular permission delete method takes in a singular PermissionRule object, or a list of them. It will delete all the permissions included in the list.
Default permissions delete method only accepts a singular PermissionRule object. It will only delete 1 set of rules maximum. See sample, line 75-79.
Code comments currently in permissions_endpoint show that delete_permissions can take either a single rule or a list. We should update delete_default_permissions to do the same.
# Delete is the only endpoint that doesn't take a list of rules
# so let's fake it to keep it consistent
Hi there, first time responder, long time user of tsc here and i want to start with you guys are awesome and very much appreciate your work here. I was working through this recently and noticed that to fix it, all that seems to be needed is to apply the same signature and loop logic that is done on the delete permissions method in the permissions endpoint to the default_permissions_endpoint.
first just update the signature, then add the check and outer loop. def delete_default_permission(self, resource: BaseItem, rules: Union[PermissionsRule,List[PermissionsRule]], content_type: Resource) -> None:
# applying fix so that delete default endpoint can handle a list of rules like the delete permissions endpoint does
if isinstance(rules,PermissionsRule):
rules = [rules]
for rule in rules:
for capability, mode in rule.capabilities.items():...`
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.
Activity
jacalata commentedon Jun 7, 2022
Code comments currently in permissions_endpoint show that delete_permissions can take either a single rule or a list. We should update delete_default_permissions to do the same.
# Delete is the only endpoint that doesn't take a list of rules
# so let's fake it to keep it consistent
jacalata commentedon Feb 16, 2023
There's quite a few methods to update:

salvuswarez commentedon Mar 15, 2023
Hi there, first time responder, long time user of tsc here and i want to start with you guys are awesome and very much appreciate your work here. I was working through this recently and noticed that to fix it, all that seems to be needed is to apply the same signature and loop logic that is done on the delete permissions method in the permissions endpoint to the default_permissions_endpoint.
first just update the signature, then add the check and outer loop.
def delete_default_permission(self, resource: BaseItem, rules: Union[PermissionsRule,List[PermissionsRule]], content_type: Resource) -> None:github-actions commentedon Aug 6, 2026
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.
github-actions commentedon Aug 21, 2026
Closing due to inactivity. If this is still relevant, please reopen or file a new issue.