add: user permissions level builder ui
This commit is contained in:
parent
a167da017e
commit
31f63c90cd
16 changed files with 511 additions and 371 deletions
|
@ -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(),
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue