Allow people with mutual connections to see profile / status; fix username check.

This commit is contained in:
Paul
2021-04-07 19:21:25 +01:00
parent 2050a0609f
commit 9e2250783c
6 changed files with 10 additions and 9 deletions

View File

@@ -64,7 +64,7 @@ impl<'a> PermissionCalculator<'a> {
_ => {}
}
if self.has_mutual_conncetion
if self.has_mutual_connection
|| get_collection("channels")
.find_one(
doc! {
@@ -84,7 +84,8 @@ impl<'a> PermissionCalculator<'a> {
})?
.is_some()
{
return Ok(UserPermission::Access as u32);
// ! FIXME: add privacy settings
return Ok(UserPermission::Access + UserPermission::ViewProfile);
}
Ok(permissions)