Closed (fixed)
Project:
Protected Node
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Feb 2013 at 16:52 UTC
Updated:
27 Nov 2013 at 18:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
uayebforever commentedThe attached patch changes the data type to "text" instead of "string", which allows the user to enter text as expected (rather than requiring a data selector).
However, I'm not sure that the corresponding password is being saved, may be an effect of the test set up I'm using, though.
Comment #2
3rd_rail commentedThat's a nice workaround for setting up a password at all. Thanks for your help. But my goal was to use the value of a field provided by the saved node as a data selector to set the password for that specific node.
Comment #3
grimreaperHello,
I just test the patch, it works. And you can select between data selection or direct input with tokens available. So you can use the value of a field provided by the selected node.
Test case :
- add a text field password to content type article
- make a rule :
- event : before saving a content of type (article)
- action : password protect node :
- content : node
- password : select your field value.
- it works.
I paste the export code of the rule :
{ "rules_password_set_automaticaly" : {
"LABEL" : "password set automaticaly",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "protected_node_rules", "rules" ],
"ON" : { "node_presave--article" : { "bundle" : "article" } },
"DO" : [
{ "protected_node_rules_action_password_protect" : { "node" : [ "node" ], "passwd" : [ "node:field-password-for-rule" ] } }
]
}
}
Thanks for the patch.
Comment #4
grimreaperComment #5
izus commentedMerged
Thanks all for the patch and the tests.