Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing AppFeature records #489

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

jrmccannon
Copy link
Contributor

Ticket

No ticket.

Description

With the replacement of magic links in Admin Console with the API, it is relying on the AppFeature record to exist and for the monthly quota to be set. With it not set, AdminConsole can't send magic links.

Shape

  • Added the max quota to the intiialize steps for AdminConsole.
  • Also added a migration that will add an AppFeature record with some default values to every app that currently doesn't have an AppFeature record. This would be every application created before AppFeatures went live (June-August time frame).

Screenshots

N/A

Checklist

I did the following to ensure that my changes were tested thoroughly:

  • Ran the script against my local database to make sure it executed and only updated the records it should have

I did the following to ensure that my changes do not introduce security vulnerabilities:

  • N/A

@jrmccannon jrmccannon requested a review from a team as a code owner March 15, 2024 17:26
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

Attention: Patch coverage is 50.05834% with 428 lines in your changes are missing coverage. Please review.

Project coverage is 32.94%. Comparing base (83019a2) to head (2404ea5).

Files Patch % Lines
...te/20240315164249_AddMissingAppFeature.Designer.cs 0.00% 410 Missing ⚠️
...ions/Sqlite/20240315164249_AddMissingAppFeature.cs 0.00% 17 Missing ⚠️
...tions/Mssql/20240315164343_AddMissingAppFeature.cs 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #489      +/-   ##
==========================================
+ Coverage   32.38%   32.94%   +0.55%     
==========================================
  Files         518      522       +4     
  Lines       26533    27390     +857     
  Branches      845      845              
==========================================
+ Hits         8594     9023     +429     
- Misses      17821    18249     +428     
  Partials      118      118              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

IsMagicLinksEnabled,
AllowAttestation,
MagicLinkEmailMonthlyQuota)
SELECT ai.Tenant, 0, 0, NULL, NULL, 1, 1, 0, 2000
Copy link
Member

Choose a reason for hiding this comment

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

I think 1000 sounds more resonable since that is what we use for external apps today.
I notice you set NULL on MaxUsers - what is the result of that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. When MaxUsers is NULL, there is no max.

All apps that I've seen that don't have this record are test applications. We can easily set this to something however.

@abergs
Copy link
Member

abergs commented Apr 3, 2024

Looks mostly good, see comment

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.

None yet

3 participants