1
votes

I'm working on some drupal installation and googled the whole day, but I can't figure out an answer to the following question:

How is it possible to alter the admin/content page in a way that specific roles are only able to see or filter out limited content types?

Please notice that I don't want to restrict node access in general, I just want to make this page less confusing for editors with different roles and tasks.

I know there is the administration views module and there I can set filter fields in the way I want. The problem with this is that I'm not able to enter the views access restrictions and so all I can do is limit the view's content types for all roles.

Can somebody give me a hint how to solve this?

Thank you very much and sorry for bad english.

1
after googling again i found that approach and got it working... drupal.stackexchange.com/a/17363 i basically understood it but it does not affect the content types provided for the filter-dropdown. and could someone give me a hint how that line works: $query->where($alias.'.type IN (:types)', array(':types' => 'article')); how can i add multiple content-type-names?c1u31355

1 Answers

1
votes

One way would be to make a custom module.

In this module you would create a page with hook_menu().

https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_menu/7

Then in the page callback function that you create you load global $user and switch between the $user->roles, out putting different HTML lists of links depending on their role. If you want something a little more dynamic you can always load the various content types with node_type_get_types().

Then go into structure -> menus -> navigation and disable the default link, replacing it with the new page you created.

If you aren't 100% clear on how to do a couple of these things comment here and I will update my answer.