Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { "rules_verify_updates_to_node_title" : {
- "LABEL" : "Verify updates to node title",
- "PLUGIN" : "reaction rule",
- "ACTIVE" : false,
- "OWNER" : "rules",
- "REQUIRES" : [ "rules" ],
- "ON" : { "node_presave--article" : { "bundle" : "article" } },
- "IF" : [
- { "NOT user_has_role" : {
- "account" : [ "site:current-user" ],
- "roles" : { "value" : { "3" : "3" } }
- }
- },
- { "NOT data_is" : { "data" : [ "node-unchanged:title" ], "value" : "[node:title]" } }
- ],
- "DO" : [
- { "drupal_message" : {
- "message" : "Tampering rejected ... An attempt to update the title of node with ID u0022[node:nid]u0022 was discovered (from u0022[node-unchanged:title]u0022 to u0022[node:title]u0022), by user u0022[site:current-user]u0022, who does not have the authorization to do so. The attempted update of the title has not been saved (all other updates were applied).",
- "type" : "error"
- }
- },
- { "data_set" : { "data" : [ "node:title" ], "value" : "[node-unchanged:title]" } }
- ]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement