That is usually called a proportioning valve (it has other names) and yes it could be where your issue is. Is has a sliding "piston/valve" type thing inside that is normally centered. If you develop a leak in the front, it will slide to one end & block off fluid to the front, allowing you to still have rear brakes without loosing ALL the fluid. It just stops sending fluid to the half of the system that is leaking, uses only the non-leaking portion of the braking system at a reduced efficiency. This is know as a dual (front & rear) braking system, the M/C has two reservoirs. This system has been required on vehicles since 1966.
What you have to do, assuming all leaks are fixed, is to re-center that valve. This is accomplished by bleeding the brakes, in your case you need to start with the fronts. When you crack open a front bleeder the system should sense a "leak" in the front & the valve should head towards the end of the bore to block flow to the front, this should open up flow to the rear.
Bucky