fix checking that users policies is not nil

This commit is contained in:
Denis Subbotin 2016-11-29 16:35:49 +03:00
parent cc374b3e2c
commit 2797c609b0
1 changed files with 3 additions and 2 deletions

View File

@ -161,8 +161,9 @@ func (b *backend) Login(req *logical.Request, username string, password string)
policies = append(policies, group.Policies...)
}
}
policies = append(policies, user.Policies...)
if user !=nil && user.Policies != nil {
policies = append(policies, user.Policies...)
}
// Policies from each group may overlap
policies = strutil.RemoveDuplicates(policies)