-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Fixed Issue #45116 #45253
Fixed Issue #45116 #45253
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
This how the logout button shall look in the GUI: GUI with the new Logout button:Screencast.from.2024-12-28.00-49-18.webmGUI after removing additional "login" text:Screencast.from.2024-12-28.00-48-49.webm |
The current fix is not a clean one. I did go through the code to make a cleaner fix which would involve including the "logout" in one of the functions in
The reason being that this menu list is called in the Enabling these changes further requires changes in the security_manager.py. Is this the correct approach? I did attempt to implement these but that just lead to the need for more changes. Also, I think that the version checking condition in the override.py can now be removed if it had been implemented solely due to the GET request at /logout endpoint. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to Jens' comment - I didn't understand from the original issue that you want to add a new button in addition to the existing one (which Jens captured in the screenshot), but to fix a broken functionality in the existing one.
I've implemented the exact same CSRF protection in #40145, so I might need some more background regarding the problems with it (if you could take a video that demonstrates it - it would be great!).
Apologies for misunderstanding.
@jscheffl @shahar1 my sincere apologies for this mishap. I have compiled the www-assets (sorry for this mistake). In my previous comment under the issue, I had presumed that the person who opened the issue tried to go to the /logout/ endpoint in the browser to logout. I should have asked them how exactly was the error occurring. The only instance of 405 error I got was when I tried to enter the /logout/ in the browser. Hence my assumption. Again, my apologies for this bad PR. I will make a comment under the issue to understand how to recreate the error. Should I close my PR until then? |
Try to take it easy. Nothing bad happened :) |
closes: #45116
related: #40470
The fix adds a "Logout" button to the navbar_menu and uses supporting JavaScript to send a POST request to the
/logout
endpoint. Additionally, it also fixes a duplicate text of "login" associated with the login button.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.