add: journals + notes
This commit is contained in:
parent
c08a26ae8d
commit
c1568ad866
26 changed files with 1431 additions and 265 deletions
|
@ -193,7 +193,10 @@ macro_rules! check_user_blocked_or_private {
|
|||
// check if other user is banned
|
||||
if $other_user.permissions.check_banned() {
|
||||
if let Some(ref ua) = $user {
|
||||
if !ua.permissions.check(FinePermission::MANAGE_USERS) {
|
||||
if !ua
|
||||
.permissions
|
||||
.check(tetratto_core::model::permissions::FinePermission::MANAGE_USERS)
|
||||
{
|
||||
$crate::user_banned!($user, $other_user, $data, $jar);
|
||||
}
|
||||
} else {
|
||||
|
@ -213,7 +216,9 @@ macro_rules! check_user_blocked_or_private {
|
|||
.get_user_stack_blocked_users($other_user.id)
|
||||
.await
|
||||
.contains(&ua.id))
|
||||
&& !ua.permissions.check(FinePermission::MANAGE_USERS)
|
||||
&& !ua
|
||||
.permissions
|
||||
.check(tetratto_core::model::permissions::FinePermission::MANAGE_USERS)
|
||||
{
|
||||
let lang = get_lang!($jar, $data.0);
|
||||
let mut context = initial_context(&$data.0.0.0, lang, &$user).await;
|
||||
|
@ -238,7 +243,9 @@ macro_rules! check_user_blocked_or_private {
|
|||
if $other_user.settings.private_profile {
|
||||
if let Some(ref ua) = $user {
|
||||
if (ua.id != $other_user.id)
|
||||
&& !ua.permissions.check(FinePermission::MANAGE_USERS)
|
||||
&& !ua
|
||||
.permissions
|
||||
.check(tetratto_core::model::permissions::FinePermission::MANAGE_USERS)
|
||||
&& $data
|
||||
.0
|
||||
.get_userfollow_by_initiator_receiver($other_user.id, ua.id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue