-
Notifications
You must be signed in to change notification settings - Fork 1k
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] Check authorized members for element access (#4538) #9809
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9809 +/- ##
==========================================
+ Coverage 64.29% 64.31% +0.02%
==========================================
Files 655 655
Lines 62933 62957 +24
Branches 6964 6976 +12
==========================================
+ Hits 40460 40492 +32
+ Misses 22473 22465 -8 ☔ View full report in Codecov by Sentry. |
a2cd443
to
3f7ccd8
Compare
8a92bf2
to
aad2eff
Compare
if (settings.platform_organization) { | ||
const userOrganizations = user.organizations.map((o) => o.internal_id); | ||
if (hasPlatformOrg) { | ||
const userOrganizations = user.organizations.map((o) => (useStandardId ? o.standard_id : o.internal_id)); |
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.
We could maybe extract All ids from the object to prevent using a special option useStandardId
8f6ddb4
to
a277817
Compare
Proposed changes
isUserCanAccessStixElement()
in order to unit test easily element access to userisUserCanAccessStixElement
Related issues
Checklist
Further comments