Is this a bug, or a normal standard condition?

Backgrounds note: The site has book of 4 levels depth, with different content types on each level and translation with two language.

I am trying to make a page-list showing the nodes of a Contexual filtering focus on Uid with set on " Provide default value " = "user ID from logged in user".

Only roles who has the permission "Bypass content access control " (from Drupal core) are able to watch own nodes who is unpublished, and at the same time able to watch all nodes who is published without the required permission above.

I have tried all possible setting in the filter criteria on published content, even remove the filter - without any changes of the problem. I have also tried to make a new Views view with a single page-display, and is getting the same result.

The Views field-list is including VBO with check on publish/unpublish boxes.
The relationship is set to Author for the content with " Require this relationship " set to ON.

The Sites modules included who involved in the permissions is: field_permissions and node_permissions and all fields- and content types- permission is triple checked. The permission for the display is set to "Roles" and the correct 3 (of 5) roles are checked.

All unpublished nodes disappear from the list if not the users role has the permission, mention above.
Here is the view attached
Please, please advice in this problem or bug-problem?

DEVEL - Access permissions by user,
Devel - report values for the user behind the role, not able to view unpublished content from the Views list:

username: AtestUser
create: YES: by node (permissions)
view: YES: view own unpublished content
update: YES: by node (permissions)
delete: NO: no reason

$view = new view();
$view->name = 'alla_klubben_sidor';
$view->description = 'Sida som visar samtliga publicerade och opublicerade sidor relaterade till ett (SC)-konto';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Alla Klubben sidor';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Klubben samtliga sidor';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'role';
$handler->display->display_options['access']['role'] = array(
  4 => '4',
  7 => '7',
  8 => '8',
);
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['exposed_form']['options']['reset_button_label'] = 'Återställ';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['columns'] = array(
  'views_bulk_operations' => 'views_bulk_operations',
  'title' => 'title',
  'type' => 'type',
  'language' => 'language',
  'status' => 'status',
  'name' => 'name',
  'edit_node' => 'edit_node',
  'depth' => 'depth',
);
$handler->display->display_options['style_options']['default'] = 'depth';
$handler->display->display_options['style_options']['info'] = array(
  'views_bulk_operations' => array(
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'title' => array(
    'sortable' => 1,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'type' => array(
    'sortable' => 1,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'language' => array(
    'sortable' => 1,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'status' => array(
    'sortable' => 1,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'name' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'edit_node' => array(
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'depth' => array(
    'sortable' => 1,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
);
$handler->display->display_options['style_options']['sticky'] = TRUE;
/* Relationship: Författare */
$handler->display->display_options['relationships']['uid']['id'] = 'uid';
$handler->display->display_options['relationships']['uid']['table'] = 'node';
$handler->display->display_options['relationships']['uid']['field'] = 'uid';
$handler->display->display_options['relationships']['uid']['ui_name'] = 'Författare';
$handler->display->display_options['relationships']['uid']['label'] = 'Node author';
$handler->display->display_options['relationships']['uid']['required'] = TRUE;
/* Fält: Bulk operations: Innehåll */
$handler->display->display_options['fields']['views_bulk_operations']['id'] = 'views_bulk_operations';
$handler->display->display_options['fields']['views_bulk_operations']['table'] = 'node';
$handler->display->display_options['fields']['views_bulk_operations']['field'] = 'views_bulk_operations';
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['display_type'] = '0';
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['enable_select_all_pages'] = 1;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['row_clickable'] = 1;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['force_single'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['entity_load_capacity'] = '10';
$handler->display->display_options['fields']['views_bulk_operations']['vbo_operations'] = array(
  'action::node_unpublish_action' => array(
    'selected' => 1,
    'postpone_processing' => 0,
    'skip_confirmation' => 0,
    'override_label' => 1,
    'label' => 'Blockera',
  ),
  'action::node_publish_action' => array(
    'selected' => 1,
    'postpone_processing' => 0,
    'skip_confirmation' => 0,
    'override_label' => 1,
    'label' => 'Publicera',
  ),
);
/* Fält: Innehåll: Titel */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = 'Sida Titel';
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
/* Fält: Innehåll: Typ */
$handler->display->display_options['fields']['type']['id'] = 'type';
$handler->display->display_options['fields']['type']['table'] = 'node';
$handler->display->display_options['fields']['type']['field'] = 'type';
$handler->display->display_options['fields']['type']['label'] = 'Sid-typ';
/* Fält: Innehåll: Språk */
$handler->display->display_options['fields']['language']['id'] = 'language';
$handler->display->display_options['fields']['language']['table'] = 'node';
$handler->display->display_options['fields']['language']['field'] = 'language';
/* Fält: Innehåll: Publicerad */
$handler->display->display_options['fields']['status']['id'] = 'status';
$handler->display->display_options['fields']['status']['table'] = 'node';
$handler->display->display_options['fields']['status']['field'] = 'status';
$handler->display->display_options['fields']['status']['not'] = 0;
/* Fält: Användare: Namn */
$handler->display->display_options['fields']['name']['id'] = 'name';
$handler->display->display_options['fields']['name']['table'] = 'users';
$handler->display->display_options['fields']['name']['field'] = 'name';
$handler->display->display_options['fields']['name']['relationship'] = 'uid';
/* Fält: Innehåll: Edit link */
$handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
$handler->display->display_options['fields']['edit_node']['table'] = 'views_entity_node';
$handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
/* Fält: Bok: Depth */
$handler->display->display_options['fields']['depth']['id'] = 'depth';
$handler->display->display_options['fields']['depth']['table'] = 'book_menu_links';
$handler->display->display_options['fields']['depth']['field'] = 'depth';
$handler->display->display_options['fields']['depth']['exclude'] = TRUE;
/* Sort criterion: Innehåll: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Contextual filter: Användare: Uid */
$handler->display->display_options['arguments']['uid']['id'] = 'uid';
$handler->display->display_options['arguments']['uid']['table'] = 'users';
$handler->display->display_options['arguments']['uid']['field'] = 'uid';
$handler->display->display_options['arguments']['uid']['relationship'] = 'uid';
$handler->display->display_options['arguments']['uid']['default_action'] = 'default';
$handler->display->display_options['arguments']['uid']['exception']['title'] = 'Alla';
$handler->display->display_options['arguments']['uid']['default_argument_type'] = 'current_user';
$handler->display->display_options['arguments']['uid']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['uid']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['uid']['summary_options']['items_per_page'] = '25';
/* Filter criterion: Innehåll: Typ */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
  'regatta' => 'regatta',
  'segling' => 'segling',
  'inbjudan_text' => 'inbjudan_text',
);
$handler->display->display_options['filters']['type']['exposed'] = TRUE;
$handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op';
$handler->display->display_options['filters']['type']['expose']['label'] = 'Visa sid-typ';
$handler->display->display_options['filters']['type']['expose']['operator'] = 'type_op';
$handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
$handler->display->display_options['filters']['type']['expose']['multiple'] = TRUE;
$handler->display->display_options['filters']['type']['expose']['remember_roles'] = array(
  2 => '2',
  1 => 0,
  8 => 0,
  6 => 0,
  5 => 0,
  7 => 0,
  4 => 0,
);
$handler->display->display_options['filters']['type']['expose']['reduce'] = TRUE;

/* Display: Klubbens alla sidor (Swe) */
$handler = $view->new_display('page', 'Klubbens alla sidor (Swe)', 'page');
$handler->display->display_options['path'] = 'klubbens-alla-sidor';
$translatables['alla_klubben_sidor'] = array(
  t('Master'),
  t('Klubben samtliga sidor'),
  t('more'),
  t('Apply'),
  t('Återställ'),
  t('Sort by'),
  t('Asc'),
  t('Desc'),
  t('Node author'),
  t('Innehåll'),
  t('- Choose an operation -'),
  t('Blockera'),
  t('Publicera'),
  t('Sida Titel'),
  t('Sid-typ'),
  t('Språk'),
  t('Publicerad'),
  t('Namn'),
  t('Edit link'),
  t('Depth'),
  t('.'),
  t(','),
  t('Alla'),
  t('Visa sid-typ'),
  t('Klubbens alla sidor (Swe)'),
);

Comments

Göran created an issue. See original summary.

göran’s picture

Issue summary: View changes
göran’s picture

After a lot of different testing, with closing a lot of contrib- modules I realize that this probably is a bug, related to Core and Book-module. By that I did also set up a support request at Drupal Core.

göran’s picture

After lot of reading I found out that this issue not is a bug!

Compromise solution found!
This issue describe a logical permission problem related to core permission incompatibility to view own nodes even if permission 'view own unpublished content' is active fore the role and the author who did create the nodes.

But there is very good module, view_unpublished, who solve some problem and make unpublished nodes visible to the author who did create them if you set up an Views and let a Views Display show them.

Its also good that you not need to set the permission: 'View any unpublished content' for the content type to be viewed in the module permission settings!
Views is able to view all own nodes to the author, if the core permission 'view own unpublished content' is active fore the authors role.

However, this issue describe a logical problem of Drupal and permission of nodes, who is still there - and has to be fixed!
By my opinion - An author must be able to find his own content, to which he has permission-rights to edit

mustanggb’s picture

Priority: Major » Normal
renatog’s picture

Status: Active » Reviewed & tested by the community

Hi @Göran.

Thank you very much for your report and solution.

It will help many people.

Thanks for a good job.

Regards.

renatog’s picture

Status: Reviewed & tested by the community » Fixed

Guys; any question about it please comment okay?

Thank you very much.

Regards.

Status: Fixed » Closed (fixed)

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