Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Use last OTP auth result to check month on client side (EXPOSUREAPP-5246) #2429

Merged
merged 3 commits into from
Feb 22, 2021

Conversation

chris-cwa
Copy link
Contributor

@chris-cwa chris-cwa commented Feb 22, 2021

how to test:

  1. take a survey (in month m)
  2. make the card green, then red again
  3. try to take the survey again (still in month m)
    expected: app shows info (not: error) that you already took part this month

@chris-cwa chris-cwa added maintainers Tag pull requests created by maintainers prio PRs to review first. labels Feb 22, 2021
@chris-cwa chris-cwa added this to the 1.13.0 milestone Feb 22, 2021
@chris-cwa chris-cwa requested a review from a team February 22, 2021 12:37
@ralfgehrer ralfgehrer self-assigned this Feb 22, 2021
@sonarcloud
Copy link

sonarcloud bot commented Feb 22, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

15.8% 15.8% Coverage
0.0% 0.0% Duplication

@LukasLechnerDev LukasLechnerDev self-assigned this Feb 22, 2021
@BMItr BMItr self-assigned this Feb 22, 2021
@ralfgehrer ralfgehrer removed their assignment Feb 22, 2021
Copy link
Contributor

@LukasLechnerDev LukasLechnerDev left a comment

Choose a reason for hiding this comment

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

LGTM! Test as described is successful. If I fake the time to next month, I get a new otp and can access the survey again.

)
val redeemedAt: Instant,
@SerializedName("invalidated")
val invalidated: Boolean
Copy link
Contributor

Choose a reason for hiding this comment

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

could be false by default

val invalidated: Boolean
) {

fun toInvalidatedInstance() = OTPAuthorizationResult(uuid, authorized, redeemedAt, true)
Copy link
Contributor

Choose a reason for hiding this comment

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

just use copy

@chris-cwa chris-cwa merged commit 1a8c254 into release/1.13.x Feb 22, 2021
@chris-cwa chris-cwa deleted the feeature/5246_local_month_check branch February 22, 2021 14:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
maintainers Tag pull requests created by maintainers prio PRs to review first.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants