1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-01-08 11:42:35 +00:00
comunicapiv3/src/data/group.rs

33 lines
748 B
Rust
Raw Normal View History

2020-06-23 16:55:23 +00:00
//! # Group information
//!
//! Group visibility level
#[allow(non_camel_case_types)]
#[derive(Eq, PartialEq, Hash)]
pub enum GroupVisibilityLevel {
OPEN_GROUP,
PRIVATE_GROUP,
SECRETE_GROUP,
}
#[allow(non_camel_case_types)]
#[derive(Eq, PartialEq, Hash, Debug)]
pub enum GroupAccessLevel {
//Can not even know if the group exists or not
NO_ACCESS = 0,
//Access to the name of the group only
LIMITED_ACCESS = 1,
//Can see the posts of the group, but not a member of the group
VIEW_ACCESS = 2,
//Member access (same as view access but as member)
MEMBER_ACCESS = 3,
//Can create posts, even if posts creation is restricted
MODERATOR_ACCESS = 4,
//Can do everything
ADMIN_ACCESS = 5,
2020-06-23 16:55:23 +00:00
}