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
Cockpit: you can delete an host used into host-group #6735
Comments
Referer to: NethServer/dev#6735
Thanks for reporting! Current validator has been added to avoid dealing with host groups without any members. What was the original problem? Can we eventually fix it without a system-wide change? |
I agree, in general the expected behavior is not what happens in similar situations. Think about a group of users: nothing forbids to remove a user account from the system if it belongs to some group. The current validator forbids the deletion of the last group member, to avoid other implementation issues (I can't remember what they are) |
Hi @gsanchietti, This row:
will never work, except for host-group with one item. If I want to delete
The condition cannot be verified if you don't use a split or something like this. |
Exactly. Looking to the original commit this is the purpose of the validator.
I know and I'm reticent to change the behavior of the validator because it's in place for a long time and I fear regressions. What is the original problem that led you changing the validator? My guess: you had issues with the proxy. |
The problem is that if you have an host used into an host-group you can delete the host and this remains linked in the host group. |
I get it. |
The problem I see is this:
After some time:
|
I see your point.
Yes, please add also this condition. Also make sure that dangling references inside the group does not cause any other issue. |
Fix host-group member deletion NethServer/dev#6735
Proposed solution should work in most case. Test case 1
Test case 2
Test case 3
Test case 4
|
Thank you for the work, released! |
Steps to reproduce
Expected behavior
Actual behavior
Components
nethserver-firewall-base
The text was updated successfully, but these errors were encountered: