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

fix: remove sanitize but still crop fields #1113

Merged
merged 10 commits into from
Apr 22, 2024
Merged

fix: remove sanitize but still crop fields #1113

merged 10 commits into from
Apr 22, 2024

Conversation

plyr4
Copy link
Contributor

@plyr4 plyr4 commented Apr 19, 2024

fixing a regression from introducing owner into repo response. tokens are getting sanitize so everything is returning 401 right now.

this change changes Sanitize to Crop which now removes dashboards, favorites and admin from the user response.

dont worry, repo responses still scrub tokens using json tags

{
	"id": 1,
	"owner": {
		"id": 1,
		"name": "plyr4",
		"active": true
	},
	"org": "plyr4",
	"name": "heyvela",
	"full_name": "plyr4/heyvela",
	"link": 

@plyr4 plyr4 marked this pull request as ready for review April 19, 2024 20:54
@plyr4 plyr4 requested a review from a team as a code owner April 19, 2024 20:54
Copy link

codecov bot commented Apr 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.98%. Comparing base (66b3088) to head (63239f3).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1113      +/-   ##
==========================================
- Coverage   65.99%   65.98%   -0.01%     
==========================================
  Files         383      383              
  Lines       12309    12308       -1     
==========================================
- Hits         8123     8122       -1     
  Misses       3664     3664              
  Partials      522      522              
Files Coverage Δ
api/types/user.go 100.00% <100.00%> (ø)
database/repo/repo.go 92.66% <100.00%> (ø)

@plyr4 plyr4 merged commit 0c1751d into main Apr 22, 2024
15 of 17 checks passed
@plyr4 plyr4 deleted the fix/owner-token branch April 22, 2024 16:24
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.

3 participants