refactor: add redundant protection checks (#1822)
This commit is contained in:
@@ -20,6 +20,7 @@ import {
|
||||
MobileDeviceInterface,
|
||||
MobileUnlockTiming,
|
||||
InternalEventBus,
|
||||
DecryptedItem,
|
||||
} from '@standardnotes/snjs'
|
||||
import { makeObservable, observable } from 'mobx'
|
||||
import { PanelResizedData } from '@/Types/PanelResizedData'
|
||||
@@ -308,4 +309,12 @@ export class WebApplication extends SNApplication implements WebApplicationInter
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
isAuthorizedToRenderItem(item: DecryptedItem): boolean {
|
||||
if (item.protected && this.hasProtectionSources()) {
|
||||
return this.hasUnprotectedAccessSession()
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user