Skip to content
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

Prevent all URL prefixes from being removed from API Backends configuration in the admin #215

Closed
GUI opened this issue Apr 19, 2015 · 0 comments

Comments

@GUI
Copy link
Member

GUI commented Apr 19, 2015

In the API Backends section of the admin, it's required that the backend must have at least 1 URL prefix setup for matching purposes. We added a validation for this condition a while ago, to help ensure admins don't create invalid API backends. This validation is working properly when setting up new API Backends for the first time, but due to some semi-non-intuitive Rails validation behavior, this validation isn't being applied to the update action. This means that it's currently possible to update an existing API backend and remove all of your URL prefixes, which leaves the API backend in an invalid state.

We had an admin hit this condition this week, and to make matters more confusing and worse, the removal of the url prefix meant that the admin no longer had permission to view the API backend (since our permissions are based upon the url prefixes), so they couldn't fix the issue themselves.

We should ensure that on the update action admins can't remove all existing url prefixes which leaves the API in an invalid state. This same issue also affects the list of backend servers that are required too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant