Skip to content
This repository was archived by the owner on Jul 6, 2022. It is now read-only.

protections public methods#225

Merged
arielsvg merged 9 commits intomasterfrom
feat/protections-public-methods
Feb 18, 2021
Merged

protections public methods#225
arielsvg merged 9 commits intomasterfrom
feat/protections-public-methods

Conversation

@arielsvg
Copy link
Copy Markdown
Contributor

With this PR we'll end up with:

  • SNApplication.hasProtections(): to determine if a user can use the feature at all (which they can't if they don't have an account, passcode, or biometrics authentication)
  • SNApplication.areProtectionsEnabled(): to determine if protections are enabled/disabled

@arielsvg arielsvg requested review from antsgar and atmoio February 17, 2021 14:50
@atmoio
Copy link
Copy Markdown
Member

atmoio commented Feb 17, 2021

Left some comments here: https://github.com/standardnotes/snjs/pull/224/files#r577674680

@arielsvg
Copy link
Copy Markdown
Contributor Author

Should be good to review now @mobitar @antsgar :)

* Use this method if you do not want to display protections-related
* information to a user who cannot currently exploit the feature.
*/
public hasProtectionSources(): boolean {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of a comment like this:

Returns true if the user has a source of protection available, such as a passcode, password, or biometrics.

I find the current comment somewhat awkwardly phrased. "Use..if you do not..who cannot..exploit"..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good! I was struggling with this one

@arielsvg arielsvg merged commit f55bc6b into master Feb 18, 2021
@arielsvg arielsvg deleted the feat/protections-public-methods branch February 18, 2021 10:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants