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
auth
on a site then again add aglobal auth
on the site , and then removeauth
(not global) from the site, thesite specific htpasswd file
is only storing global auths which is redundant ashttpasswd/default file
will be storing it.So when we delete globalauth
from site , thesite specific htpasswd file
will 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
avl
file.What was causing problem
When on a site there are both global and site specific
ip
whitelist present and when we remove site specificip
whitelist first , thesite specific avl
file is only storing globalip
whitelist which is redundant asvhost.d/default_avl
file will be storing it.So when we delete globalip
whitelist , thesite specific avl
file will remain as it is.So the solution was to make sure that if a site only have globalip
whitelist , it will not be kept in separatesite specific avl
.