diff --git a/includes/MediaYouTubeBrowser.inc b/includes/MediaYouTubeBrowser.inc index 1b25ffa..1cd63aa 100644 --- a/includes/MediaYouTubeBrowser.inc +++ b/includes/MediaYouTubeBrowser.inc @@ -14,17 +14,17 @@ class MediaYouTubeBrowser extends MediaBrowserPlugin { * Implements MediaBrowserPluginInterface::access(). */ public function access($account = NULL) { - return media_youtube_access('create', NULL, $account); + return media_internet_access($account); } /** * Implements MediaBrowserPlugin::view(). */ public function view() { - // Check if the user is able to add remote media. - if (user_access('add media from remote sources')) { - $build['form'] = drupal_get_form('media_youtube_add', $this->params['types'], $this->params['multiselect']); - return $build; - } + $build = array(); + $params = $this->params; + $build['form'] = drupal_get_form('media_youtube_add', $params); + + return $build; } } diff --git a/media_youtube.install b/media_youtube.install index 58ef6e0..6919412 100644 --- a/media_youtube.install +++ b/media_youtube.install @@ -255,3 +255,13 @@ function media_youtube_update_7203() { variable_del("media_youtube__{$setting}"); } } + +/** + * Update the Media YouTube browser's access check. + * + * Check your permissions; after this update the Media YouTube browser will be + * available to users with the "administer files" or "add media from remote + * sources" permissions only. + */ +function media_youtube_update_7204() { +}