Skip to content

Conversation

@jimmyfagan
Copy link
Contributor

JIRA Ticket:
BB2-3520

What Does This PR Do?

  • Undoes short term fix in the permissions checks
  • Unskips tests that were broken due to the short term fix
  • Adjusts demographic scope removal to require True to keep demographic scopes (formerly would work for None as well, only relevant to unit tests)
  • Removes duplicate tests which formerly utilized a waffle switch that is no longer in use

What Should Reviewers Watch For?

If you're reviewing this PR, please check for these things in particular:

  • Any issues with changing the check for == "False" to a check for != "True"
  • Any issues with the validation plan below?

Validation

Tested this locally by trying to create a token with patient/profile scope, not selecting the demographic box and continuing. I failed to get a token as expected.
I then tested with selecting the demographic box, got a token back with patient/profile scope, and was able to use that for Patient and profile endpoints, but nothing else. All as expected. While this is out for review, and during the deployment cycle, I'll continue testing out a variety of other cases, most notably confirming that this works correctly for apps which don't display the demographic check box.

What Security Implications Does This PR Have?

Please indicate if this PR does any of the following:

  • Adds any new software dependencies
  • Modifies any security controls
  • Adds new transmission or storage of data
  • Any other changes that could possibly affect security?
  • Yes, one or more of the above security implications apply. This PR must not be merged without the ISSO or team
    security engineer's approval.

Any Migrations?

  • Yes, there are migrations
    • The migrations should be run PRIOR to the code being deployed
    • The migrations should be run AFTER the code is deployed
    • There is a more complicated migration plan (downtime,
      etc)
  • No migrations

Copy link
Contributor

@loganbertram loganbertram left a comment

Choose a reason for hiding this comment

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

Prefect! And good extra catch on the true/false positioning for the demo scopes check.


# Remove demographic information scopes, if beneficiary is not sharing
if cleaned_data.get("share_demographic_scopes") == "False":
if cleaned_data.get("share_demographic_scopes") != "True":
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch. This is way more explicit.

@jimmyfagan jimmyfagan enabled auto-merge (squash) November 6, 2024 20:25
@jimmyfagan jimmyfagan merged commit 3d7f3b4 into master Nov 6, 2024
6 checks passed
@jimmyfagan jimmyfagan deleted the jimmyfagan/bb2-3520-remove-short-term-incident-fix branch November 6, 2024 21:01
Copy link
Contributor

@loganbertram loganbertram left a comment

Choose a reason for hiding this comment

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

I know it's already merged, but test fixes look good!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants