Cap and freeze-gate GroupServ registration

This commit is contained in:
Jean Chevronnet 2026-07-19 17:45:04 +00:00
parent 0c85c5b569
commit fa9eaece45
No known key found for this signature in database
4 changed files with 22 additions and 0 deletions

View file

@ -657,6 +657,11 @@ impl Db {
names
}
/// How many groups `account` is the founder of (bounds group registration).
pub fn groups_founded(&self, account: &str) -> usize {
self.net.groups.iter().filter(|g| g.founder.eq_ignore_ascii_case(account)).count()
}
/// The groups an account belongs to (founder or member).
pub fn groups_of(&self, account: &str) -> Vec<String> {
self.net

View file

@ -401,6 +401,9 @@ impl Store for Db {
fn groups_of(&self, account: &str) -> Vec<String> {
Db::groups_of(self, account)
}
fn groups_founded(&self, account: &str) -> usize {
Db::groups_founded(self, account)
}
fn channel_caps(&self, channel: &str, account: &str) -> Caps {
Db::channel_caps(self, channel, account)
}