Skip to content

Commit

Permalink
Merge pull request #4 from emilymye/issue3
Browse files Browse the repository at this point in the history
Fix rollback error on roleset not being created properly.
  • Loading branch information
emilymye authored Apr 12, 2018
2 parents 963249c + 60014bc commit ada0fa6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/rollback.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ func (b *backend) serviceAccountPolicyRollback(ctx context.Context, req *logical
return err
}

// Take our any bindings still being used by this role set from roles being removed.
// Take out any bindings still being used by this role set from roles being removed.
rolesToRemove := util.ToSet(entry.Roles)
if rs.AccountId.ResourceName() == entry.AccountId.ResourceName() {
if rs != nil && rs.AccountId.ResourceName() == entry.AccountId.ResourceName() {
currRoles, ok := rs.Bindings[entry.Resource]
if ok {
rolesToRemove = rolesToRemove.Sub(currRoles)
Expand Down

0 comments on commit ada0fa6

Please sign in to comment.