GH-34 Fix for ee auth delete global and ee auth delete global --ip
#53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1st Issue
Reference #34
Approach
The additional code will ensure that if a site only have global auths , it will not be kept in separate site specific htpasswd file.
What was causing problem
When we create a
authon a site then again add aglobal authon the site , and then removeauth(not global) from the site, thesite specific htpasswd fileis only storing global auths which is redundant ashttpasswd/default filewill be storing it.So when we delete globalauthfrom site , thesite specific htpasswd filewill remain as it is.So the solution was to make sure that if a site only have globalauths, it will not be kept in separatesite specific htpasswd file.2nd Issue
Reference #34 (comment)
Approach
The additional code will ensure that if a site only have global ip whitelist , it will not be kept in separate site specific
avlfile.What was causing problem
When on a site there are both global and site specific
ipwhitelist present and when we remove site specificipwhitelist first , thesite specific avlfile is only storing globalipwhitelist which is redundant asvhost.d/default_avlfile will be storing it.So when we delete globalipwhitelist , thesite specific avlfile will remain as it is.So the solution was to make sure that if a site only have globalipwhitelist , it will not be kept in separatesite specific avl.