You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "amoghrajesh (via GitHub)" <gi...@apache.org> on 2023/08/02 17:51:35 UTC
[GitHub] [airflow] amoghrajesh commented on a diff in pull request #33022: Affix webserver access_denied warning to be configurable
amoghrajesh commented on code in PR #33022:
URL: https://github.com/apache/airflow/pull/33022#discussion_r1282241143
##########
tests/www/test_security.py:
##########
@@ -969,3 +971,16 @@ def test_users_can_be_found(app, security_manager, session, caplog):
assert len(users) == 1
delete_user(app, "Test")
assert "Error adding new user to database" in caplog.text
+
+
+def test_access_denied_message():
+ with mock.patch.dict(
+ os.environ,
+ {"AIRFLOW__WEBSERVER__ACCESS_DENIED_MESSAGE": "My custom access denied message"},
+ clear=True,
+ ):
+ initialize_config()
+ assert conf.get("webserver", "access_denied_message") == "My custom access denied message"
+
+ initialize_config()
+ assert conf.get("webserver", "access_denied_message") == "Access is Denied"
Review Comment:
Yeah why not. Very valid suggestions. Incorporated them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org