Cal. Health & Safety Code § 11350
(c) Except in unusual cases in which it would not serve the interest of justice to do so, whenever a court grants probation pursuant to a felony conviction under this section, in addition to any other conditions of probation which may be imposed, the following conditions of probation shall be ordered:
(d) It is not unlawful for a person other than the prescription holder to possess a controlled substance described in subdivision (a) if both of the following apply: