-
Notifications
You must be signed in to change notification settings - Fork 946
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] crop effective confidence level in [0-100] #5787
Conversation
import type { AuthUser } from '../types/user'; | ||
import { cropNumber } from './math'; | ||
|
||
export const computeUserEffectiveConfidenceLevel = (user: AuthUser) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this function as an utility and added unit tests
opencti-platform/opencti-graphql/tests/02-integration/02-resolvers/group-test.js
Outdated
Show resolved
Hide resolved
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #5787 +/- ##
==========================================
+ Coverage 64.81% 65.57% +0.75%
==========================================
Files 521 523 +2
Lines 61347 61438 +91
Branches 4899 5568 +669
==========================================
+ Hits 39762 40285 +523
+ Misses 21585 21153 -432 ☔ View full report in Codecov by Sentry. |
b46ab37
to
e38bdae
Compare
3972324
to
3d01224
Compare
Tested ✅ Works fine ! |
4d4cb3b
to
5685118
Compare
Closes #5759
Proposed changes
user_effective_level
is cropped between [0-100] on computation, that's allChecklist
Further comments
This PR replaces #5768