vault: ignore a nil policy object, as it has no permissions
This commit is contained in:
parent
b354f03cb2
commit
fe402cdd87
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue