code: function findSuperRoles (rootRoleId, memberships) {
    const inherits = []
    const applicableMemberships = memberships.filter(m => m.memberId === rootRoleId)
    for (const membership of applicableMemberships) {
      inherits.push(
        membership.roleId,
        ...findSuperRoles(membership.roleId, memberships)
      )
    }
    return inherits
  }
docs: superRoles