From 211913d2ce91a826d61053a942dd6c920289c2c4 Mon Sep 17 00:00:00 2001 From: cameronvoell Date: Tue, 14 May 2024 06:27:37 -0700 Subject: [PATCH 1/3] feat: added intent for updating admin lists --- proto/mls/database/intents.proto | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/proto/mls/database/intents.proto b/proto/mls/database/intents.proto index c82b5f2..d19d398 100644 --- a/proto/mls/database/intents.proto +++ b/proto/mls/database/intents.proto @@ -90,6 +90,27 @@ message UpdateMetadataData { } } +// Sort direction for queries +enum AdminListUpdateType { + ADD_ADMIN = 0; + REMOVE_ADMIN = 1; + ADD_SUPER_ADMIN = 2; + REMOVE_SUPER_ADMIN = 3; +} + +// The data required to update group admin/super admin lists +message UpdateAdminListsData { + // V1 of UpdateMetadataPublishData + message V1 { + AdminListUpdateType admin_list_update_type = 1; + string inbox_id = 2; + } + + oneof version { + V1 v1 = 1; + } +} + // Generic data-type for all post-commit actions message PostCommitAction { // An installation From 350aefb1474543a0aca04618e4f1e97c7459c45b Mon Sep 17 00:00:00 2001 From: cameronvoell Date: Wed, 15 May 2024 07:10:44 -0700 Subject: [PATCH 2/3] fix: fixed comments --- proto/mls/database/intents.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/mls/database/intents.proto b/proto/mls/database/intents.proto index d19d398..481f137 100644 --- a/proto/mls/database/intents.proto +++ b/proto/mls/database/intents.proto @@ -90,7 +90,7 @@ message UpdateMetadataData { } } -// Sort direction for queries +// Type of update to admin lists enum AdminListUpdateType { ADD_ADMIN = 0; REMOVE_ADMIN = 1; @@ -100,7 +100,7 @@ enum AdminListUpdateType { // The data required to update group admin/super admin lists message UpdateAdminListsData { - // V1 of UpdateMetadataPublishData + // V1 of UpdateAdminListsPublishData message V1 { AdminListUpdateType admin_list_update_type = 1; string inbox_id = 2; From b532dbaf5f2a615c2bfa55f130a2eb98853cd990 Mon Sep 17 00:00:00 2001 From: cameronvoell Date: Wed, 22 May 2024 10:30:48 -0700 Subject: [PATCH 3/3] fix: admin update type lint --- proto/mls/database/intents.proto | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/proto/mls/database/intents.proto b/proto/mls/database/intents.proto index 481f137..95a3d6e 100644 --- a/proto/mls/database/intents.proto +++ b/proto/mls/database/intents.proto @@ -92,10 +92,11 @@ message UpdateMetadataData { // Type of update to admin lists enum AdminListUpdateType { - ADD_ADMIN = 0; - REMOVE_ADMIN = 1; - ADD_SUPER_ADMIN = 2; - REMOVE_SUPER_ADMIN = 3; + ADMIN_LIST_UPDATE_TYPE_UNSPECIFIED = 0; + ADMIN_LIST_UPDATE_TYPE_ADD_ADMIN = 1; + ADMIN_LIST_UPDATE_TYPE_REMOVE_ADMIN = 2; + ADMIN_LIST_UPDATE_TYPE_ADD_SUPER_ADMIN = 3; + ADMIN_LIST_UPDATE_TYPE_REMOVE_SUPER_ADMIN = 4; } // The data required to update group admin/super admin lists