Lower case all policy values in ParsePolicies before processing

This commit is contained in:
vishalnayak 2016-05-05 05:22:59 -04:00
parent bd6f1bbd08
commit 0cec22d27a
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ func ParsePolicies(policiesRaw string) []string {
policies := strings.Split(policiesRaw, ",")
defaultFound := false
for i, p := range policies {
policies[i] = strings.TrimSpace(p)
policies[i] = strings.ToLower(strings.TrimSpace(p))
// If 'root' policy is present, ignore all other policies.
if policies[i] == "root" {
policies = []string{"root"}