Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. { "rules_verify_updates_to_node_title" : {
  2. "LABEL" : "Verify updates to node title",
  3. "PLUGIN" : "reaction rule",
  4. "ACTIVE" : false,
  5. "OWNER" : "rules",
  6. "REQUIRES" : [ "rules" ],
  7. "ON" : { "node_presave--article" : { "bundle" : "article" } },
  8. "IF" : [
  9. { "NOT user_has_role" : {
  10. "account" : [ "site:current-user" ],
  11. "roles" : { "value" : { "3" : "3" } }
  12. }
  13. },
  14. { "NOT data_is" : { "data" : [ "node-unchanged:title" ], "value" : "[node:title]" } }
  15. ],
  16. "DO" : [
  17. { "drupal_message" : {
  18. "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).",
  19. "type" : "error"
  20. }
  21. },
  22. { "data_set" : { "data" : [ "node:title" ], "value" : "[node-unchanged:title]" } }
  23. ]
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement