Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set custom permissions on group creation #918

Merged
merged 4 commits into from
Jul 23, 2024

Conversation

cameronvoell
Copy link
Contributor

@cameronvoell cameronvoell commented Jul 23, 2024

Closes #907

  • Adds an optional FfiPermissionPolicySet to FfiCreateGroupOptions in the mls bindings
  • Updates xmtp_mls/src/client.rs create_group function to take a permission PolicySet instead of a PreconfiguredPolicies enum.
  • To set custom permissions on group creation from ffi bindings, we should pass in FfiGroupPermissionsOptions::CustomPolicy AND also include the FfiPermissionPolicySet object that includes the actual polices.
  • Add/Remove Admin can only be set to Admin only, SuperAdmin only, or Deny
  • Other Permission policies can be set to Admin only, SuperAdmin only, Allow, or Deny

See new tests for demonstration: https://github.com/xmtp/libxmtp/pull/918/files#diff-3a24c3e76565487a710ac9863ac05160128f4f90892e07849b555a6de43a6e8fR2671-R2885

@cameronvoell cameronvoell marked this pull request as ready for review July 23, 2024 14:48
@cameronvoell cameronvoell requested a review from a team as a code owner July 23, 2024 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a default to group creation for custom permission policy
2 participants