[PR #5071] [MERGED] Redirect users away from /login, if they are already logged in #12963

Closed
opened 2025-12-29 22:24:37 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/5071
Author: @n0emis
Created: 8/30/2020
Status: Merged
Merged: 9/4/2020
Merged by: @jeremystretch

Base: developHead: redirect-when-logged-in


📝 Commits (2)

  • bfcbd9d Redirect users away from /login, if they are already logged in
  • f92569d move redirect code to own function

📊 Changes

1 file changed (+18 additions, -8 deletions)

View changed files

📝 netbox/users/views.py (+18 -8)

📄 Description

Fixes: #4977

Before returning the login form, the corresponding method now checks if the user is already logged in. when this is the case, the user get's redirected.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/5071 **Author:** [@n0emis](https://github.com/n0emis) **Created:** 8/30/2020 **Status:** ✅ Merged **Merged:** 9/4/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `redirect-when-logged-in` --- ### 📝 Commits (2) - [`bfcbd9d`](https://github.com/netbox-community/netbox/commit/bfcbd9da6c17df65b63a355c276cea0b53d5d305) Redirect users away from /login, if they are already logged in - [`f92569d`](https://github.com/netbox-community/netbox/commit/f92569d4688bf58758c0009a3bb13261d25033ac) move redirect code to own function ### 📊 Changes **1 file changed** (+18 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `netbox/users/views.py` (+18 -8) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be opened for approval prior to filing a pull request. This helps avoid wasting time and effort on something that we might not be able to accept. Please indicate the relevant feature request or bug report below. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ACCEPTED BUG REPORT OR FEATURE REQUEST, IT WILL BE MARKED AS INVALID AND CLOSED. --> ### Fixes: #4977 <!-- Please include a summary of the proposed changes below. --> Before returning the login form, the corresponding method now checks if the user is already logged in. when this is the case, the user get's redirected. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:24:37 +01:00
adam closed this issue 2025-12-29 22:24:37 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12963