What I want is whenever a registered user saves a page type node - that specific node should be made inaccessible to the user.
So if a registered user has save node/122, node/122 should be made inaccessible to the user.
How can I do it?
|
What I want is whenever a registered user saves a page type node - that specific node should be made inaccessible to the user. So if a registered user has save node/122, node/122 should be made inaccessible to the user. How can I do it? |
|||||
|
|
Easy! When a new Page is created, just change its owner to a different user with appropriate role and permissions. In our case, let's say to admin. First, install the Rules package, enable Rules and Rules Admin modules. Navigate yourself to the Rules | Triggered rules | Add a new rule page: Label: Detach page from creator Make sure the new rule is active. Save changes and on the next page Add a condition: Select the condition to add: Content has type Save and Add an action: Select an action to add: Load a user account Save and again, Add an action: Select an action to add: Set the content author Done! This changes the node creator and the original author has control over it no more. As you will see, this is just the quickest solution to your problem. Rules module enables you to go wild and achieve heaps of stuff that you would normally expect separate modules to be put together for. To get the idea, have a look at how I used Rules (in conjunction with Flag) to keep track of Recently viewed nodes in Drupal. Note that the node creator always has view permission to the node, as long as they have |
||||
|
|
|
For each content type that is associated with the Node module, the module defines the following permissions: create, edit any content, edit own content, delete any content, and delete own content. You can allow users with a role to create nodes of a specific content type, and not allow those users to edit those nodes; what the Node module doesn't allow is to forbid users with a role to view nodes basing of their content type. If the question is how an administrator user can hide content from the ordinary users, then an administrator user can unpublish a node. This can be done in the node edit page, using the form fields in the "Publish options" field set; alternatively, it can be done from admin/content/node (admin/content in Drupal 7) selecting the nodes to unpublish and the "Unpublish" ("Unpublish the selected content" in Drupal 7) option in the "Update options" field set. |
|||||||||
|