Server: sensitive flag takes precedence over ownership
This commit is contained in:
parent
2cce47af4b
commit
1f6c5d4076
|
@ -315,14 +315,14 @@ pub(crate) fn can_view(
|
||||||
can_view_sensitive: bool,
|
can_view_sensitive: bool,
|
||||||
) -> Option<()> {
|
) -> Option<()> {
|
||||||
if let Some(viewer) = viewer {
|
if let Some(viewer) = viewer {
|
||||||
if viewer == submission.profile_id() {
|
|
||||||
return Some(());
|
|
||||||
}
|
|
||||||
|
|
||||||
if submission.is_sensitive() && !can_view_sensitive {
|
if submission.is_sensitive() && !can_view_sensitive {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if viewer == submission.profile_id() {
|
||||||
|
return Some(());
|
||||||
|
}
|
||||||
|
|
||||||
if let Some(block) = cache.blocks.get(&submission.profile_id()) {
|
if let Some(block) = cache.blocks.get(&submission.profile_id()) {
|
||||||
if *block {
|
if *block {
|
||||||
return None;
|
return None;
|
||||||
|
|
Loading…
Reference in a new issue