OAKLAND, Calif. — Oakland Mayor Libby Schaaf has ordered an end to the city's police department's policy that forced job applicants to give it access to confidential records, including records that disclosed whether they had been sexually assaulted.

Schaaf's order came after the San Francisco Chronicle revealed in a story Sunday that the department required potential hires to sign a waiver that gave background investigators access to "local criminal history information ... including if I have been a victim of sexual assault."

"Sexual assault survivors have persevered through trauma, and their resilience is a character quality we respect, honor, and welcome in Oakland," she said in a statement Sunday.

The disclosure request is on a release form for new Oakland police hires that has been in use since at least 2011, well before the #MeToo movement that started a year ago with accusations against film producer Harvey Weinstein.

Legal experts told the newspaper the inquiry was odd and potentially problematic, but they disagreed on whether it was illegal.

Oakland police officials told the newspaper candidates were not denied positions for being a sexual assault victim. Officials said they wanted the information so they could review police reports in which applicants' named might have appeared.

Schaaf also said she has ordered a thorough review of Oakland police hiring practices "to ensure no other barriers discourage the hiring of women or minority applicants."