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,
|
||||
) -> Option<()> {
|
||||
if let Some(viewer) = viewer {
|
||||
if viewer == submission.profile_id() {
|
||||
return Some(());
|
||||
}
|
||||
|
||||
if submission.is_sensitive() && !can_view_sensitive {
|
||||
return None;
|
||||
}
|
||||
|
||||
if viewer == submission.profile_id() {
|
||||
return Some(());
|
||||
}
|
||||
|
||||
if let Some(block) = cache.blocks.get(&submission.profile_id()) {
|
||||
if *block {
|
||||
return None;
|
||||
|
|
Loading…
Reference in a new issue