0

I have created a user with the rights to view, edit and delete nodes of all the content types including some custom content types. On admin / content page it shows the list of contents of all content types except one custom content type.

little edit Its showing the contents of that content type when I am adding the content from that user but not showing the contents of that content type posted as user1

When we try to filter the contents to banner content type it shows no results, when we filter the contents to other content types including some custom content types it shows the filtered list.

I checked the permission for that content type for the user role which was not defined earlier but even after granting the permissions its not showing up.

After defining the permissions I have also rebuild the permission but the result is still the same.

9
  • Are you sure you have created a node with your custom content type? Can you try to add content of your custom content type and then see if it is visible under admin/content?
    – AjitS
    Feb 20, 2013 at 13:38
  • @Indrock Yes in-fact when I login through user1 it shows me the list of that content type. Further that content type is created for banners which are displaying well even as anonymous user Feb 20, 2013 at 13:40
  • I'm not sure if I understand this clearly. You say the content type is not appearing under admin/content; do you mean to say you are logged in as a different user(other than user 1)? If so did you assign Administer content permission to your new user?
    – AjitS
    Feb 20, 2013 at 13:45
  • Yes I have created a user with permissions to administer that content type Feb 20, 2013 at 13:49
  • Strange thing happening, when I am adding content with that user its showing in the list. But the contents which I have added as user1 are not showing in admin/content page Feb 20, 2013 at 13:50

1 Answer 1

0

I assume that you just forgot to publish the content. Since the first user has access to every content, he can see unpublished content from the userX, but userX cant see unpublished content created by user1. To change this behavior you could give userX the permission "bypass node access".

For further explanation take a look at the official documentation:

http://api.drupal.org/api/drupal/modules!node!node.module/group/node_access/7

In determining access rights for a node, node_access() first checks whether the user has the "bypass node access" permission. Such users have unrestricted access to all nodes. user 1 will always pass this check.

Edit: As mentioned in the comment, although this solution solves the initial answer, in most cases it isn´t good to give the "bypass node access" to a large number of users. In the case which is described in the comment, you should use a more sophisticated module for content pushblishing like the Workflow Module.

6
  • You are right the nodes of banner content type are unpublished. I had a chat with indrock he also suggested the same solution, which resolve this issue for now. But there are two problems one the user x has the permission to view unpublished contents than why he is unable to view those nodes. 2nd why he can view his own unpublished node of that content type. One more thing giving the userX bypass node access permissions will give him the right to create and all type of nodes including webform which I don't want user to create. Please suggest any other solution to this problem. Feb 20, 2013 at 16:37
  • I hope the workflow module will help in your case! Since that use case wasn´t clear in the question, maybe it would be a good idea to edit the question according to it. :)
    – jumper
    Feb 20, 2013 at 16:51
  • To address your questions: The permission which you are referring to is called "View own unpublished content", which explains why the user can not see other users unpublished content.
    – jumper
    Feb 20, 2013 at 16:57
  • you are right again, I missed "own" though I have seen that several time. Any how currently I have resolved this problem by changing the author to userX Feb 20, 2013 at 18:59
  • 1
    Just in case if some one else looking for the solution for this problem, must visit drupal.org/node/1106606 The module View unpublished allows you to grant access for specific user roles to view unpublished nodes of a specific type. Access control is quite granular in this regard. Additionally, using this module does not require any modifications to your existing URL structure. Feb 21, 2013 at 1:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.