vault: ignore a nil policy object, as it has no permissions

This commit is contained in:
Armon Dadgar 2015-03-24 15:49:17 -07:00
parent b354f03cb2
commit fe402cdd87
1 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,10 @@ func NewACL(policies []*Policy) (*ACL, error) {
// Inject each policy
for _, policy := range policies {
// Ignore a nil policy object
if policy == nil {
continue
}
// Check if this is root
if policy.Name == "root" {
a.root = true