Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: handle unprotected session expiration #779

Merged
merged 39 commits into from
Dec 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
8194082
feat: hide note contents if the protection expires when the protected…
vardan-arm Nov 22, 2021
3fe90ee
feat: handle session expiration for opened protected note for both pl…
vardan-arm Nov 23, 2021
da4a5fa
fix: if after canceling session expiry modal only one unprotected no…
vardan-arm Nov 23, 2021
0d22e06
Merge remote-tracking branch 'origin/develop' into feat/protect-open-…
vardan-arm Nov 23, 2021
db9e09f
refactor: handle session expiration for opened protected note (move t…
vardan-arm Nov 24, 2021
b05a357
feat: handle the case of selecting "Don't remember" option in session…
vardan-arm Nov 25, 2021
18ecd09
Merge remote-tracking branch 'origin/develop' into feat/protect-open-…
vardan-arm Nov 25, 2021
5da6e5b
Merge remote-tracking branch 'origin/develop' into feat/protect-open-…
vardan-arm Nov 30, 2021
166ac74
Merge remote-tracking branch 'origin/develop' into feat/protect-open-…
vardan-arm Nov 30, 2021
af66f25
test (WIP): add unit tests for protecting opened note after the sessi…
vardan-arm Dec 2, 2021
bd92d90
Merge remote-tracking branch 'origin/develop' into feat/protect-open-…
vardan-arm Dec 2, 2021
b8b518f
test: add remaining unit tests
vardan-arm Dec 6, 2021
c88f316
Merge remote-tracking branch 'origin/develop' into feat/protect-open-…
vardan-arm Dec 6, 2021
ca3d32a
refactor: move the opened note protection logic to "editor_view"
vardan-arm Dec 8, 2021
72d4225
Merge remote-tracking branch 'origin/develop' into feat/protect-open-…
vardan-arm Dec 8, 2021
ae5be9c
refactor: reviewer comments
vardan-arm Dec 9, 2021
015f779
refactor: reviewer's comments:
vardan-arm Dec 9, 2021
0cb1adf
Merge remote-tracking branch 'origin/develop' into feat/protect-open-…
vardan-arm Dec 9, 2021
fdefea2
refactor: avoid `any` type for `appEvent` payload
vardan-arm Dec 9, 2021
e8c63d3
test: add unit tests
vardan-arm Dec 9, 2021
aa4c1c7
chore: update function name
vardan-arm Dec 9, 2021
487e7c8
refactor: use simpler protection session event types
moughxyz Dec 9, 2021
cfe55ed
refactor: protected access terminology
moughxyz Dec 10, 2021
78ad5f9
Merge remote-tracking branch 'origin/develop' into feat/protect-open-…
vardan-arm Dec 13, 2021
f6a00d0
refactor: start counting idle timer after every edit (instead of coun…
vardan-arm Dec 13, 2021
3a55feb
test: unit tests
vardan-arm Dec 13, 2021
74d0bca
style: don't give extra brightness to the "View Note"/"Authenticate" …
vardan-arm Dec 13, 2021
1d7b07f
Merge remote-tracking branch 'origin/develop' into feat/protect-open-…
vardan-arm Dec 14, 2021
f6ddb77
Merge remote-tracking branch 'origin/develop' into feat/protect-open-…
vardan-arm Dec 14, 2021
24b4979
chore: bump snjs version
vardan-arm Dec 14, 2021
3fc952c
chore: put snjs "beta" version
vardan-arm Dec 17, 2021
9f0bf7f
Merge remote-tracking branch 'origin/develop' into beta/protect-open-…
vardan-arm Dec 17, 2021
cbc3b92
fix: run protection timeout when the note is marked as protected
vardan-arm Dec 20, 2021
c025ac7
chore: snjs version bump
vardan-arm Dec 20, 2021
3a85927
refactor: immediately lock the note if it's marked as "Protected"
vardan-arm Dec 20, 2021
d693ce0
refactor: rename component, directive and some props
vardan-arm Dec 20, 2021
f6a783d
refactor: remove extra check
vardan-arm Dec 20, 2021
bcbf0e8
refactor: rename the method
vardan-arm Dec 20, 2021
d9b0ca4
chore: update snjs version
vardan-arm Dec 20, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"parserOptions": {
"project": "./app/assets/javascripts/tsconfig.json"
},
"ignorePatterns": [".eslintrc.js", "webpack.*.js", "webpack-defaults.js", "jest.config.js"],
"ignorePatterns": [".eslintrc.js", "webpack.*.js", "webpack-defaults.js", "jest.config.js", "__mocks__"],
"rules": {
"standard/no-callback-literal": 0, // Disable this as we have too many callbacks relying on literals
"no-throw-literal": 0,
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ yarn-error.log
package-lock.json

codeqldb

coverage
11 changes: 11 additions & 0 deletions app/assets/javascripts/__mocks__/@standardnotes/snjs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const {
ApplicationEvent,
ProtectionSessionDurations,
ProposedSecondsToDeferUILevelSessionExpirationDuringActiveInteraction,
} = require('@standardnotes/snjs');

module.exports = {
ApplicationEvent: ApplicationEvent,
ProtectionSessionDurations: ProtectionSessionDurations,
ProposedSecondsToDeferUILevelSessionExpirationDuringActiveInteraction,
};
4 changes: 2 additions & 2 deletions app/assets/javascripts/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import { StartApplication } from './startApplication';
import { Bridge } from './services/bridge';
import { SessionsModalDirective } from './components/SessionsModal';
import { NoAccountWarningDirective } from './components/NoAccountWarning';
import { NoProtectionsdNoteWarningDirective } from './components/NoProtectionsNoteWarning';
import { ProtectedNoteOverlayDirective } from './components/ProtectedNoteOverlay';
import { SearchOptionsDirective } from './components/SearchOptions';
import { AccountMenuDirective } from './components/AccountMenu';
import { ConfirmSignoutDirective } from './components/ConfirmSignoutModal';
Expand Down Expand Up @@ -174,7 +174,7 @@ const startApplication: StartApplication = async function startApplication(
.directive('accountMenu', AccountMenuDirective)
.directive('quickSettingsMenu', QuickSettingsMenuDirective)
.directive('noAccountWarning', NoAccountWarningDirective)
.directive('protectedNotePanel', NoProtectionsdNoteWarningDirective)
.directive('protectedNotePanel', ProtectedNoteOverlayDirective)
.directive('searchOptions', SearchOptionsDirective)
.directive('confirmSignout', ConfirmSignoutDirective)
.directive('multipleSelectedNotesPanel', MultipleSelectedNotesDirective)
Expand Down
180 changes: 0 additions & 180 deletions app/assets/javascripts/components/AccountMenu/DataBackup.tsx

This file was deleted.

33 changes: 0 additions & 33 deletions app/assets/javascripts/components/AccountMenu/Encryption.tsx

This file was deleted.

80 changes: 0 additions & 80 deletions app/assets/javascripts/components/AccountMenu/ErrorReporting.tsx

This file was deleted.

Loading