fix role revision index for rolebindings that bind to clusterroles

This commit is contained in:
Ryan Sanna 2021-09-14 14:20:32 -07:00
parent 8ecda307ee
commit fe125f80f3

View File

@ -90,8 +90,7 @@ func (p *policyRuleIndex) addRolesToHash(digest hash.Hash, subjectName string) {
digest.Write(null)
case "ClusterRole":
digest.Write([]byte(rb.RoleRef.Name))
digest.Write([]byte(rb.Namespace))
digest.Write([]byte(p.revisions.roleRevision(rb.Namespace, rb.RoleRef.Name)))
digest.Write([]byte(p.revisions.roleRevision("", rb.RoleRef.Name)))
digest.Write(null)
}
}