fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Team user should not access OS version on another team.

Open getvictor opened this issue 1 year ago • 1 comments

#17117 For fleet/os_versions and /fleet/os_versions/[id], team users can no longer access os versions on hosts from other teams.

Team admin /os_versions - only returns os versions for the user's team(s)

GET https://localhost:8080/api/v1/fleet/os_versions

Team admin /os_versions/:id on 'No Team' - 403

GET https://localhost:8080/api/v1/fleet/os_versions/5

Global admin /os_versions/:id?team_id does not exist anywhere - 404

GET https://localhost:8080/api/v1/fleet/os_versions/999999?team_id=1

Checklist for submitter

  • [x] Changes file added for user-visible changes in changes/ or orbit/changes/. See Changes files for more information.
  • [x] Added/updated tests
  • [x] Manual QA for all new/changed functionality

getvictor avatar Mar 04 '24 19:03 getvictor

Codecov Report

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

Project coverage is 65.43%. Comparing base (3445a11) to head (a3bde97). Report is 128 commits behind head on main.

Files Patch % Lines
server/service/hosts.go 67.44% 8 Missing and 6 partials :warning:
server/datastore/mysql/hosts.go 89.47% 1 Missing and 1 partial :warning:
server/mock/datastore_mock.go 0.00% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17347      +/-   ##
==========================================
+ Coverage   65.42%   65.43%   +0.01%     
==========================================
  Files        1190     1190              
  Lines      107027   107115      +88     
  Branches     2569     2569              
==========================================
+ Hits        70019    70096      +77     
- Misses      31652    31658       +6     
- Partials     5356     5361       +5     
Flag Coverage Δ
backend 66.43% <76.31%> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 04 '24 19:03 codecov[bot]