PROVIDENCE, R.I. — Employers would be prohibited from demanding access to a worker's social media accounts under legislation pending in Rhode Island General Assembly.

The bill would make it illegal for an employer to require an employee or a job applicant to show them their social media accounts or provide passwords. The rule wouldn't apply if a company is investigating allegations of employee misconduct or violation of workplace rules.

The proposal introduced by Senate Majority Leader Dominick Ruggerio and House Rep. Brian Patrick Kennedy also would make it clear that colleges and universities cannot demand access to a student's Facebook account or other social media program.

Kennedy says it's important the state's privacy laws keep up with the growing popularity of social media.

Similar legislation failed last year.