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

feat: Update to block users from accessing app if guest set to false for enterprise #417

Merged
merged 14 commits into from
Mar 13, 2024

Conversation

RulaKhaled
Copy link
Contributor

@RulaKhaled RulaKhaled commented Feb 26, 2024

Purpose/Motivation

What is the feature? Why is this being done?
This change affects enterprise users only. We need a setting to disable guest access where it is enabled by default. We are looking to block guest users from accessing ALL enterprise pages and redirect them back to the login page, as we technically cannot block them there

Links to relevant tickets

codecov/feedback#252

closes: codecov/feedback#297

What does this PR do?

Include a brief description of the changes in this PR. Bullet points are your friend.

Notes to Reviewer

Anything to note to the team? Any tips on how to review, or where to start?

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@RulaKhaled RulaKhaled requested a review from a team as a code owner February 26, 2024 14:23
@codecov-qa
Copy link

codecov-qa bot commented Feb 26, 2024

Codecov Report

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

Project coverage is 96.06%. Comparing base (56d6eee) to head (31c967d).

Files Patch % Lines
codecov/settings_enterprise.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #417      +/-   ##
==========================================
- Coverage   96.06%   96.06%   -0.01%     
==========================================
  Files         643      643              
  Lines       17117    17129      +12     
==========================================
+ Hits        16444    16455      +11     
- Misses        673      674       +1     
Flag Coverage Δ
unit 96.06% <92.30%> (-0.01%) ⬇️
unit-latest-uploader 96.06% <92.30%> (-0.01%) ⬇️

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

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

Copy link

codecov-public-qa bot commented Feb 26, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (56d6eee) 96.06% compared to head (31c967d) 96.06%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #417      +/-   ##
==========================================
- Coverage   96.06%   96.06%   -0.01%     
==========================================
  Files         643      643              
  Lines       17117    17129      +12     
==========================================
+ Hits        16444    16455      +11     
- Misses        673      674       +1     
Flag Coverage Δ
unit 96.06% <92.30%> (-0.01%) ⬇️
unit-latest-uploader 96.06% <92.30%> (-0.01%) ⬇️

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

Files Coverage Δ
codecov/settings_base.py 85.86% <ø> (ø)
codecov/settings_dev.py 100.00% <100.00%> (ø)
codecov_auth/middleware.py 98.76% <100.00%> (+0.17%) ⬆️
codecov/settings_enterprise.py 0.00% <0.00%> (ø)

Impacted file tree graph

@codecov-staging
Copy link

codecov-staging bot commented Feb 26, 2024

Codecov Report

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

Files Patch % Lines
codecov/settings_enterprise.py 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@RulaKhaled RulaKhaled marked this pull request as draft February 26, 2024 15:29
@RulaKhaled RulaKhaled removed the request for review from a team February 26, 2024 15:30
@RulaKhaled RulaKhaled marked this pull request as ready for review March 8, 2024 13:39
Copy link

codecov bot commented Mar 8, 2024

Codecov Report

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

Project coverage is 95.89%. Comparing base (db019c3) to head (c44cf4a).
Report is 21 commits behind head on main.

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

Changes have been made to critical files, which contain lines commonly executed in production. Learn more

Files Patch % Lines
codecov/settings_enterprise.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #417     +/-   ##
=======================================
+ Coverage   95.79   95.89   +0.10     
=======================================
  Files        757     763      +6     
  Lines      17293   18655   +1362     
=======================================
+ Hits       16565   17889   +1324     
- Misses       728     766     +38     
Flag Coverage Δ
unit 96.05% <88.88%> (-0.04%) ⬇️
unit-latest-uploader 96.05% <88.88%> (-0.04%) ⬇️

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

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

Copy link
Contributor

@giovanni-guidini giovanni-guidini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jerrodcodecov
Copy link
Contributor

@RulaKhaled are we ready to merge this one?

@RulaKhaled
Copy link
Contributor Author

@RulaKhaled are we ready to merge this one?

I was hoping to test this on staging before merging, but I guess there's no easy way to test API changes for self-hosted. So, yeah, I'll give this one last local test round and send it

@RulaKhaled RulaKhaled merged commit 5cac53d into main Mar 13, 2024
14 of 18 checks passed
@RulaKhaled RulaKhaled deleted the guest-for-eneteprise branch March 13, 2024 16:18
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.

Support guest access for enteprise in the API
3 participants