add: post comments
add: user follow api, user block api
This commit is contained in:
parent
559ce19932
commit
8580e34be2
18 changed files with 296 additions and 49 deletions
|
@ -11,6 +11,8 @@ bitflags! {
|
|||
const DEFAULT = 1 << 0;
|
||||
const ADMINISTRATOR = 1 << 1;
|
||||
const MEMBER = 1 << 2;
|
||||
const MANAGE_POSTS = 1 << 3;
|
||||
const MANAGE_ROLES = 1 << 4;
|
||||
|
||||
const _ = !0;
|
||||
}
|
||||
|
@ -93,9 +95,14 @@ impl JournalPermission {
|
|||
}
|
||||
|
||||
/// Check if the given [`JournalPermission`] qualifies as "Member" status.
|
||||
pub fn check_helper(self) -> bool {
|
||||
pub fn check_member(self) -> bool {
|
||||
self.check(JournalPermission::MEMBER)
|
||||
}
|
||||
|
||||
/// Check if the given [`JournalPermission`] qualifies as "Moderator" status.
|
||||
pub fn check_moderator(self) -> bool {
|
||||
self.check(JournalPermission::MANAGE_POSTS)
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for JournalPermission {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue