Skip to content

Commit

Permalink
fix: Replace required permission for update_policy
Browse files Browse the repository at this point in the history
Changed old permission set_policy to the new update_policies
  • Loading branch information
mike-pisman committed Oct 13, 2023
1 parent c116990 commit edccfa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unipoll_api/actions/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async def update_policy(policy: Policy,
await policy.parent_resource.fetch_all_links() # type: ignore

# Check if the user has the required permissions to update the policy
await Permissions.check_permissions(policy.parent_resource, "set_policy", check_permissions)
await Permissions.check_permissions(policy.parent_resource, "update_policies", check_permissions)
ResourcePermissions = eval(
"Permissions." + policy.parent_resource.resource_type.capitalize() + "Permissions") # type: ignore

Expand Down

0 comments on commit edccfa9

Please sign in to comment.