Skip to content

[Hold for Payment on 16 June] Make permissions checking asynchronous by creating a withBetas HOC #3194

Description

@iwiznia

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Problem

The methods in permissions.js file should be asynchronous. They kind of already are if you look at the code, since data is coming from Onyx, but the methods themselves as synchronous, which does not align with how the data is loaded, so there are possible race conditions.

Solution

Change all places where permissions is used to instead subscribe to the ONYXKEYS.BETAS onyx key and call permissions methods passing the betas it got from onyx (see this comment)

Upwork posting - https://www.upwork.com/jobs/~01f29f2d2fa738d842

/cc @tgolen @marcaaron

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions