Limiting media browser plugins visibility with user permissions cause the whole media browser to crash.
The error message is Fatal error: Unsupported operand media.browser.inc on line 52.
This happens because media browser is unable to handle empty responses from plugins that the user isn't allowed to use.

Patch to fix this bug is provided in this post.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

attekilpela’s picture

Status: Patch (to be ported) » Needs review
Dave Reid’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
FileSize
732 bytes

I've confirmed the issue in theory (the proper way to limit permissions is to perform the user_access() checks in hook_media_browser_plugin_info() and not in the actual browser plugin) but here's an alternative patch that backports some of the defensive code to prevent an error in this case.

Dave Reid’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.