-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Adds db read-only middleware #12490
Adds db read-only middleware #12490
Conversation
I like the approach here, however I don't think it satisfies FR #11233, which specifically asks for a dedicated "read-only" mode separate from maintenance mode. There's definitely a lot of overlap between the two concepts though, and I'm not sure whether having both makes sense. |
Maybe we could keep this as is, and introduce a |
Would it not be confusing to have 2 different modes? Also, currently maintenance mode only displays a banner that does not do anything functionaly which I believe this PR fixes by putting the app in read only. In maintenance mode, I as an admin would want to continue to do whatever I need in the background but still keep the application up in read-only which IMO is a better option. |
I think that's also a good idea. Do you want to do this implementation as a part of this PR itself? |
No, I think it deserves its own FR. I'll put one in. |
Opened #12554 for the |
@jeremystretch Should I update the error message with the |
I'm not sure about that, because we can't be certain that whatever text the user configures for the banner is going to be relevant. IMO it's best to stick with a static error message that explicitly explains that write operations aren't currently supported. (If there's a maintenance banner value, they'll see it in the UI anyway.) |
Thanks @abhi1693! |
* adds db read-only middleware netbox-community#11233 * fixed attribute error * replaces getattr with get_config
Fixes: #11233