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

[backend] add effective_confidence_level computed field to users (#4304) #5596

Merged

Conversation

labo-flg
Copy link
Member

@labo-flg labo-flg commented Jan 18, 2024

[To merge in feature branch for #4304]

This PR brings the effective_confidence_level to users.
It's a computed value (algo described in code comments) and not an attribute in the schema, that depends on user's confidence level and the confidence levels of his organizations and groups.

We also add platform_critical_alerts as part of settings, if any a dialog is shown to admins at login / any refresh of the app.
It invite admin to do something about an issue in the app with clear CTA. Only one alert possible: null effective confidence level found in some groups.

Further comments

Backend code was split to allow for easy unit tests, added to user-test.ts.

Note that adding group_confidence_level and org_confidence_level is not part of this PR, but the algorithm will work fine as this will be optional fields anyway.

@labo-flg labo-flg added the filigran team use to identify PR from the Filigran team label Jan 18, 2024
@labo-flg labo-flg self-assigned this Jan 18, 2024
@labo-flg labo-flg force-pushed the issue/4304-confidence-new-schema-def branch from 32b5a01 to 00ac6e9 Compare January 24, 2024 10:23
labo-flg and others added 25 commits January 24, 2024 11:26
Co-authored-by: Laurent Bonnet <laurent.bonnet@filigran.io>
* only on groups + user
* fix tests, include source
Copy link

codecov bot commented Jan 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (issue/4304-confidence-new-schema-def@00ac6e9). Click here to learn what that means.

❗ Current head f89e83b differs from pull request most recent head de7691a. Consider uploading reports for the commit de7691a to get more accurate results

Additional details and impacted files
@@                           Coverage Diff                           @@
##             issue/4304-confidence-new-schema-def    #5596   +/-   ##
=======================================================================
  Coverage                                        ?   66.27%           
=======================================================================
  Files                                           ?      508           
  Lines                                           ?    59947           
  Branches                                        ?     4382           
=======================================================================
  Hits                                            ?    39728           
  Misses                                          ?    20219           
  Partials                                        ?        0           

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

@labo-flg labo-flg merged commit 993282c into issue/4304-confidence-new-schema-def Jan 24, 2024
1 of 3 checks passed
@labo-flg labo-flg deleted the issue/4304-effective-level branch January 24, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants