diff --git a/commerce_file.install b/commerce_file.install index b8e8f61bcbe64c9b285dd71c778857971b59fb31..c23b0ccffc55db047ee951ea0406ee2e433e015e 100644 --- a/commerce_file.install +++ b/commerce_file.install @@ -103,15 +103,6 @@ function commerce_file_install() { 'default' => 0, ); db_change_field('file_managed', 'filesize', 'filesize', $spec); - - // Grant the "view any commerce_product entity" permission to all - // authenticated roles, since it's needed for the My Files view to work. - // Most installations already have this done, but doing it here explicitly - // ensures an easier initial setup. - $roles = user_roles(TRUE); - foreach ($roles as $rid => $name) { - user_role_change_permissions($rid, array('view any commerce_product entity' => TRUE)); - } } /** diff --git a/includes/views/commerce_file.views_default.inc b/includes/views/commerce_file.views_default.inc index 57b87f7512e2dd1d2e42370151b39659750161e3..4098485ec13e02eadd926ee0df4e422b55037460 100644 --- a/includes/views/commerce_file.views_default.inc +++ b/includes/views/commerce_file.views_default.inc @@ -29,6 +29,7 @@ function commerce_file_views_default_views() { $handler->display->display_options['access']['perm'] = 'view own licenses'; $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['query']['type'] = 'views_query'; + $handler->display->display_options['query']['options']['disable_sql_rewrite'] = TRUE; $handler->display->display_options['exposed_form']['type'] = 'basic'; $handler->display->display_options['pager']['type'] = 'full'; $handler->display->display_options['pager']['options']['items_per_page'] = '20'; @@ -98,7 +99,7 @@ function commerce_file_views_default_views() { $handler->display->display_options['relationships']['commerce_file_fid']['field'] = 'commerce_file_fid'; $handler->display->display_options['relationships']['commerce_file_fid']['relationship'] = 'product'; $handler->display->display_options['relationships']['commerce_file_fid']['required'] = TRUE; - /* Field: Commerce License: Commerce license ID */ + /* Field: Commerce License: License ID */ $handler->display->display_options['fields']['license_id']['id'] = 'license_id'; $handler->display->display_options['fields']['license_id']['table'] = 'commerce_license'; $handler->display->display_options['fields']['license_id']['field'] = 'license_id'; @@ -179,7 +180,7 @@ function commerce_file_views_default_views() { $handler->display->display_options['menu']['weight'] = '0'; $handler->display->display_options['menu']['context'] = 0; $handler->display->display_options['menu']['context_only_inline'] = 0; - $translatables['licensed_files'] = array( + $translatables['commerce_license_my_files'] = array( t('Master'), t('Files'), t('more'),