33 CFR 159.7 is the citation that describes all the acceptable ways a system can be secured. Which ones are legal for your boat depends upon whether your boat is equipped with a Type I or II MSD (treatment device) or a Type III (holding tank).
If your toilet is connected to a Type I or II MSD (treatment device), acceptable methods of securing the device include --
(1) Closing the seacock and removing the handle;
(2) Padlocking the seacock in the closed position;
(3) Using a non-releasable wire-tie to hold the seacock in the closed position; or
(4) Locking the door to the space enclosing the toilets with a padlock or door handle key lock.
If your toilet is connected to a holding tank, acceptable methods of securing the device include --
(1) Closing each valve leading to an overboard discharge and removing the handle;
(2) Padlocking each valve leading to an overboard discharge in the closed position; or
(3) Using a non-releasable wire-tie to hold each valve leading to an overboard discharge in the closed position.
(Note "each valve," which means ALL the valves including seacocks, not just a y-valve.)