Servers: Fetch and edit members.

Permissions: Use bit representation for permissions.
This commit is contained in:
Paul
2021-06-06 14:57:55 +01:00
parent 0af4fa4be9
commit 1f1d9613e2
10 changed files with 256 additions and 23 deletions

View File

@@ -10,10 +10,10 @@ use std::ops;
#[derive(Debug, PartialEq, Eq, TryFromPrimitive, Copy, Clone)]
#[repr(u32)]
pub enum UserPermission {
Access = 1,
ViewProfile = 2,
SendMessage = 4,
Invite = 8,
Access = 0b00000000000000000000000000000001, // 1
ViewProfile = 0b00000000000000000000000000000010, // 2
SendMessage = 0b00000000000000000000000000000100, // 4
Invite = 0b00000000000000000000000000001000, // 8
}
bitfield! {