add: user permissions level builder ui

This commit is contained in:
trisua 2025-04-06 13:43:12 -04:00
parent a167da017e
commit 31f63c90cd
16 changed files with 511 additions and 371 deletions

View file

@ -183,7 +183,13 @@ impl DataManager {
}
}
if admin_count >= 5 {
let maximum_count = if owner.permissions.check(FinePermission::SUPPORTER) {
10
} else {
5
};
if admin_count >= maximum_count {
return Err(Error::MiscError(
"You are already owner/co-owner of too many communities to create another"
.to_string(),

View file

@ -27,6 +27,7 @@ bitflags! {
const MANAGE_REPORTS = 1 << 16;
const BANNED = 1 << 17;
const INFINITE_COMMUNITIES = 1 << 18;
const SUPPORTER = 1 << 19;
const _ = !0;
}