-
Notifications
You must be signed in to change notification settings - Fork 23
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
Adds the ability to add/remove admins and super admins #782
Conversation
bindings_ffi/src/mls.rs
Outdated
|
||
pub fn is_admin(&self, account_address: &String) -> Result<bool, GenericError> { | ||
let admin_list = self.admin_list()?; | ||
Ok(admin_list.contains(account_address)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait. Isn't the admin list going to be defined in terms of inbox_id
, not account_address
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 updated a7cbdce
@@ -628,6 +628,7 @@ fn extract_metadata_changes( | |||
immutable_metadata, | |||
old_mutable_metadata, | |||
), | |||
num_super_admins: old_mutable_metadata.super_admin_list.len() as u32, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be the new_mutable_metadata
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea I had a check in a world where you can only remove 1 super admin at a time, that there must be more than 1 before you remove. But checking that the new mutable metadata has at least one super admin is the better option so that removing multiple superadmins would evaluate correctly as well. fixed here - d5d06f4
Part of #664
Depends on proto update:
This PR adds the following:
Before merging:
dev/gen_protos.sh
back tomain