Skip to content

Commit

Permalink
Merge pull request #192 from xmtp/cv/update-permissions-intents
Browse files Browse the repository at this point in the history
feat: new update permission intent type
  • Loading branch information
cameronvoell authored Jun 27, 2024
2 parents ecb2770 + 2aabd4c commit 9ee2710
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions proto/mls/database/intents.proto
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,40 @@ message UpdateAdminListsData {
}
}

// Type of Permission to Update
enum PermissionUpdateType {
PERMISSION_UPDATE_TYPE_UNSPECIFIED = 0;
PERMISSION_UPDATE_TYPE_ADD_MEMBER = 1;
PERMISSION_UPDATE_TYPE_REMOVE_MEMBER = 2;
PERMISSION_UPDATE_TYPE_ADD_ADMIN = 3;
PERMISSION_UPDATE_TYPE_REMOVE_ADMIN = 4;
PERMISSION_UPDATE_TYPE_UPDATE_METADATA = 5;
}

// Permission Policy
enum PermissionPolicyOption {
PERMISSION_POLICY_OPTION_UNSPECIFIED = 0;
PERMISSION_POLICY_OPTION_ALLOW = 1;
PERMISSION_POLICY_OPTION_DENY = 2;
PERMISSION_POLICY_OPTION_ADMIN_ONLY = 3;
PERMISSION_POLICY_OPTION_SUPER_ADMIN_ONLY = 4;
}

// The data required to update permissions
message UpdatePermissionData {
// V1 of UpdatePermissionData
message V1 {
PermissionUpdateType permission_update_type = 1;
PermissionPolicyOption permission_policy_option = 2;
// Metadata permissions update specify which field permission they are updating
optional string metadata_field_name = 3;
}

oneof version {
V1 v1 = 1;
}
}

// Generic data-type for all post-commit actions
message PostCommitAction {
// An installation
Expand Down

0 comments on commit 9ee2710

Please sign in to comment.