I have created a Drupal 7 website where I want any (not just own) unpublished content to be editable for authenticated users. I wrote a module to change all the permissions so when I type the URL to edit the unpublished node with an authenticated user account it is editable.
The only thing I can't do is to display the unpublished node in the content overview page of the authenticated user.
Do you have any idea?
You can create a View which lists all unpublished content by all authors.
You may also want to keep track of this issue: http://drupal.org/node/1192074 since the View Unpublished module has the same problem you're experiencing.
Related
I have a Magazine Article content-type set up, and a corresponding Magazine Editor role who should have permissions to create and publish articles.
When logged in as administrator, I can see the usual Publishing Options tab at the bottom of the node edit screen for article nodes (ie: /node/56157/edit), with a checkbox to Publish the node. I can also see the Publish link in the admin sub-menu on a revision page (ie:/node/56157/revisions/60546/view). This is all correct.
However: when logged in as a Magazine Editor, I cannot see the Publishing Options tab at the bottom of the node edit screen. There are only three tabs present: "URL path settings", "Revision information" and "Meta tags". Neither do I see the Publish link when viewing an unpublished revision. I want to be able to publish Article nodes when logged in as a Magazine Editor.
Under the role permissions for the Magazine Editor (/admin/people/permissions/11), the following checkboxes are ticked:
Node:
View published content
View own unpublished content
View content revisions
Magazine Article: Create new content
Magazine Article: Edit own content
Magazine Article: Edit any content
Magazine Article: Delete own content
Magazine Article: Delete any content
Revisioning:
View revision status messages
Edit content revisions
Publish content revisions (of anyone's content)
Unpublish current revision (of anyone's content)
Magazine Article: View revisions of own content
Magazine Article: View revisions of anyone's content
Magazine Article: Publish revisions of own content
Magazine Article: Publish revisions of anyone's content
Googling seems to suggest that I need to set "Administer Nodes" permission under "Node". However, I'm unable to find a permission in the list that looks like "Administer Nodes".
Why are the Publishing options unavailable?
You need to enable the 'Administer Content' permission in the Node section.
You can set permission for publishing contents by using Publish Content module.
Features
Global un/publish any content
Per "node type" un/publish any [node type] content
Per user un/publish own [node type] content
(Optionally) adds a "Publish/unpublish" tab, action links or button for one-click un/publishing.
Exposes publish/unpublish links to your views, making it easy to streamline workflows for reviewers, editors and publishers.
Provides Organic Group permissions allowing group members the specific ability to publish or unpublish content.
Provides developer API hooks for programatically allowing or denying publishing access to content for site builders with specific needs
The Revisioning module changes the UI somewhat and is likely hiding that tab set. See the online documentation Specifically, the part about unpublishing content.
Unpublish?
In most revision moderation scenarios content does not
often get unpublished. Rather a different revision is made current
while the previous revisions is auto-archived.
To remove a piece of content (current and all revisions) from public
view without deleting it, you have to unpublish the node. You can do
this by unticking the appropriate box on the content editing form.
This requires the role to have the "Administer content" permission,
which also grants access to a few more options. If you don't want to
do this, give the role the more fine-grained "Unpublish current
revision" permission instead. Content may then be unpublished from the
Revisions tab that sits next to the View tab.
I am not sure that this will fix your problem "Bypass content access control" i also could not publish/unpublish the content.
We can use Override node options module to do this task.
Install module and go to admin->manage users->permissions->roles select a role you want, and click edit permissions.
find override node permissions then select content type you want give permissions to.
On my site a authorized user can create a content type called protocol. This can be saved as either published or unpublished by the user. I want to make a page containing a view called "My protocols" where the current user can go and view all the protocols which they are the author of, published and unpublished.
To do this I created the view "My protocols" with the Views module, which shows the protocols in an unformated list of teasers. I use the filters "Content: Type(=protocol)" and "(author) User:Current(Yes)". And for page settings I have :
Path:/my-protocols
Menu:Normal: My protocols
Access:Permission | View own unpublished content
I've tried varying the Access part with no succes.
And under people>permissions I have set to allow authorized users to: "View own unpublished content" and "Access content overview page" (and other stuff offcourse, but these the ones I taught might be related to my problem with Views)
When I try looking at the "My protocols" view logged in as a authorized user I can't get it to show unpublished content, and I have checked that this users has created content of the type protocol which is both published and unpublished. But when looking at the page when logged in as an administrator I see both published and unpublished content.
Is it for some reason not possible to do what I want to do? Or have I forgotten something? Or do I need to install some further module to do it?
I think this is because views uses the node_access table to check node access rights, but unpublished nodes are removed from the node_access table. You may try disabling "SQL rewriting" in the "Query settings" of the view, under the "Advanced" section. Not sure if that is the solution though.
According to the documentation at http://drupal.org/node/1106606 "By enabling 'View own unpublished content', you grant users access to their own unpublished content." Great, but then how can a user with that permission actually find her own unpublished content?
I have a Drupal 7 site and I created a user, then gave 'Content Editor' and 'Blogger' roles to it. I checked the permissions and those roles have 'View own unpublished content' set. Along with permissions such as 'View the administrative dashboard'. Please see the following screen shots:
http://www.flickr.com/photos/64416865#N00/5736169925/
http://www.flickr.com/photos/64416865#N00/5736720168/
However the user that has only 'Content Editor' + 'Blogger' roles cannot see any link on which she can click to see her unpublished content. I can log in as an administrator, then I see the administrative overlay, I can see the 'Find content' link on top, I can visit /admin/content. But that other user cannot see that administrative overlay and when tries to visit /admin/content she receives "Access denied You are not authorized to access this page." message.
Am I missing some permissions? Or did I forget some other thing? How can a non-admin user with 'View own unpublished content' permission set actually see the list of her unpublished content items?
UPDATE: Based on some suggestions and realising the security implications of my first solution I undid it, installed the Views and created a view which shows unpublished blog entries filtered by author = current user. I think this is much more compatible with the 'Drupal way'.
Apparently one also needs to set 'Access the content overview page' permission! So that the user can access admin/content.
Drupal doesn't create a list of unpublished content by default; therefore, there is no such listing. If you don't want to give admin permissions to the content listing for your Content Editor and Blogger users, you can try creating a View to list all the user's unpublished content and make the view available to the user so that he/she can see the list.
How do I set content permission so that specific nodes are only visible to the admin user, while other nodes of the same content type may be visible by all users.
D6: Go to admin/user/permissions and make sure access content is unchecked for all roles.
D7: Go to admin/people/permissions and make sure View published content is unchecked for all roles other than Administrator
Best way would be to use Content Access module as it provides admin/structure/types/manage/content-type/access page to manage permissions.
There you can check PER CONTENT NODE ACCESS CONTROL SETTINGS to enable content level permission for different nodes of same content type.
Now you can go to node/node-id/access page to provide permission for particular node and only assign view any content permission to admin user.
If you don't want to go to the trouble of installing a new module you could just unpublish the content, then only administrators will be able to view it
how can I set role permissions (content access) for specific content types, rather than CCK fields ?
I actually want the login page to appear of the user access to pages of a specific content type, or a specific view
thanks
I think this will solve your problem
http://drupal.org/project/content_access
http://drupal.org/project/node_privacy_byrole
Then in the site configuration change the access denied page to "user/login". This should do the job.