Posted by wjaspers on September 23, 2010 at 7:09pm
How do I create a rule / action set wherein:
- If a certain TYPE of content is deleted
- Which HAS a particular taxonomy term
- All REFERENCED users to the node
- (excluding the acting user)
- Will have one or more ROLEs altered?
My use case is as follows:
I have a large set of Sales representatives/distributors, whom each have access to certain data within our site only they may see.
If we delete their Company (content-type) page (and these users have been referenced FROM it), I want to take away their permissions as "sales reps".
Comments
Hah; figured it out. Turns
Hah; figured it out.
Turns out my other test instance has some serious problems in it.
WARNING!!!
Since I had more than one content type which can be affected, I discovered a shared User Reference field CANNOT be reused in RULES.
Make SURE if you have multiple content-types with user references, that each field is separately NAMED.
I was able to set this up (in another, better functioning test instance) by:
In Rules, go to:
Works for multiple references?
I was going to say that this task will be really tricky, until I read your comment.
Does your method work for multiple references as well? If so, I definately should check this out.
Cheers!
//Johan Falk, NodeOne, Sweden
I haven't had a chance to
I haven't had a chance to test it in depth yet; but, in my better (and more complete) testing instance of Drupal 6, I have separate rules for separate Distributor and Service "Company" content types.
I will assume (until Monday, when I can test it), that it works.
I'd much rather have ONE content type for "Company" and then be able to compare a taxonomy term applied to the node; but the current version of Rules doesn't allow me to have a taxonomy condition.
It works! It works! I also
It works! It works!
I also set up a similar rule so that if I unpublish a certain piece of content, the same effect is produced. Now all I need is to assign the reverse of it.
Its too bad there are no Taxonomy conditions -- otherwise I could really leverage this rule.
EDIT: Shows what I know. Taxonomy conditions are just the use of "Text Comparison" conditions. It would be nice if Taxonomy had its own category.