dpgaspar / Flask-AppBuilder

Simple and rapid application development framework, built on top of Flask. includes detailed security, auto CRUD generation for your models, google charts and much more. Demo (login with guest/welcome) - http://flaskappbuilder.pythonanywhere.com/
BSD 3-Clause "New" or "Revised" License
4.63k stars 1.35k forks source link

feat: AUTH_REMOTE_USER_ENV_VAR config key for auth REMOTE_USER type #2193

Closed dpgaspar closed 7 months ago

dpgaspar commented 7 months ago

Description

A simple solution for: https://github.com/dpgaspar/Flask-AppBuilder/issues/2014

Add a new config key AUTH_REMOTE_USER_ENV_VAR to allow for users to set their own WSGI env var that holds the current username.

ADDITIONAL INFORMATION

codecov[bot] commented 7 months ago

Codecov Report

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

Comparison is base (9123fcb) 79.57% compared to head (23cdc5e) 79.71%.

Files Patch % Lines
flask_appbuilder/security/views.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2193 +/- ## ========================================== + Coverage 79.57% 79.71% +0.13% ========================================== Files 72 72 Lines 8985 8990 +5 ========================================== + Hits 7150 7166 +16 + Misses 1835 1824 -11 ``` | [Flag](https://app.codecov.io/gh/dpgaspar/Flask-AppBuilder/pull/2193/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+Vaz+Gaspar) | Coverage Δ | | |---|---|---| | [python](https://app.codecov.io/gh/dpgaspar/Flask-AppBuilder/pull/2193/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+Vaz+Gaspar) | `79.71% <83.33%> (+0.13%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+Vaz+Gaspar#carryforward-flags-in-the-pull-request-comment) to find out more.

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