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,
|
2020-06-24 11:34:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[allow(non_camel_case_types)]
|
2020-06-24 12:08:46 +00:00
|
|
|
#[derive(Eq, PartialEq, Hash, Debug)]
|
2020-06-24 11:34:09 +00:00
|
|
|
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
|
|
|
}
|