Skip to content

[Due for payment 2025-07-15] [Betas][Clean Up] Enforce Permissions Pattern #64317

Closed

Description

@grgia

Let's enforce the clean up refactor we did to Permissions.ts recently to prevent habitual patterns

https://expensify.slack.com/archives/C01GTK53T8Q/p1750096771551159?thread_ts=1750091383.820109&cid=C01GTK53T8Q

Issue OwnerCurrent Issue Owner: @laurenreidexpensify

Activity

  1. added
    Daily
    Bug
    on Jun 17, 2025
  2. melvin-bot commented on Jun 17, 2025

    @melvin-bot

    Triggered auto assignment to @laurenreidexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. grgia commented on Jun 17, 2025

    @grgia
    ContributorAuthor

    @parasharrajat is taking this 🚀

  4. parasharrajat commented on Jun 19, 2025

    @parasharrajat
    Member

    Update: I will work on this soon.

  5. parasharrajat commented on Jun 20, 2025

    @parasharrajat
    Member

    @grgia So I have created a new ESLint rule for this. It is simply a check for betas?.includes('anything') in the return statement of the function to determine the invalid case. Should I create a PR for this in the expensify-eslint config? It is not a very generic rule, so I am not sure whether we should put this in the config package. Can you please confirm?

  6. grgia commented on Jun 23, 2025

    @grgia
    ContributorAuthor

    I don't think we need to add it to the config package given it's repo specific

  7. parasharrajat commented on Jun 24, 2025

    @parasharrajat
    Member

    Ok, Thanks. Then it makes it a bit complicated, as our ESLint version only allows adding the rules via a plugin. I will check other ways to do so in the app.

  8. parasharrajat commented on Jun 26, 2025

    @parasharrajat
    Member

    After trying a few times, I think we can't add the rule locally. Eslint only supports via plugin so I used one eslint-plugin-rulesdir. This one allows passing customer rules, but it is not working as we are also using this same eslint-plugin-rulesdir plugin in our common plugin https://github.com/Expensify/eslint-config-expensify/blob/77884bbc3e7c3782f94fe8799f2cd0ca3fafef9b/index.js#L4. The only way is to move the rule to our package and then enable it only in new Dot Eslint config. This works, I tested it.

    I noticed that we also have a few more repo-specific rules like https://github.com/Expensify/eslint-config-expensify/blob/main/eslint-plugin-expensify/prefer-actions-set-data.js in the plugin, so it will not be an issue to put another one there.

    What do you say?

    Created the PR Expensify/eslint-config-expensify#148

  9. parasharrajat commented on Jun 26, 2025

    @parasharrajat
    Member

    @grgia ⬆

  10. 22 remaining items

  11. melvin-bot commented on Jul 8, 2025

    @melvin-bot

    @parasharrajat @laurenreidexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  12. laurenreidexpensify commented on Jul 10, 2025

    @laurenreidexpensify
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment:

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal Template
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    Do we agree 👍 or 👎

  13. parasharrajat commented on Jul 10, 2025

    @parasharrajat
    Member

    No checklist is needed here. It was a new change related to DX.

  14. added
    Daily
    and removed
    Weekly
    on Jul 15, 2025
  15. melvin-bot commented on Jul 15, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@laurenreidexpensify)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  16. laurenreidexpensify commented on Jul 16, 2025

    @laurenreidexpensify
    Contributor

    @grgia can you confirm payment is $250 thanks

  17. grgia commented on Jul 16, 2025

    @grgia
    ContributorAuthor
  18. laurenreidexpensify commented on Jul 17, 2025

    @laurenreidexpensify
    Contributor

    Payment Summary

  19. parasharrajat commented on Jul 28, 2025

    @parasharrajat
    Member

    Payment requested as per #64317 (comment)

  20. twisterdotcom commented on Jul 31, 2025

    @twisterdotcom
    Contributor

    @parasharrajat has submitted payment for this report on ND here.

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

    Zapier Logs Run ID: 00040eee-f7b9-a130-a0c2-619fde180b91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDaily

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions