Hi,

I would say this is a fantastic module. I have been thinking of creating a module similar to this. However, I was thinking of building it together with the workflow module. This way, as the state changes the permission that the user referenced in the user-reference field can change.

E.g. When a node gets shifted from state "active" to "inactive", perhaps the users user-referenced in the user-reference-field "right-to-edit" can lose the permission to edit?

Any chance this can be edited to provide this functionality?

Comments

mitchell’s picture

Content Access now includes actions and conditions for Rules and Workflow-ng. (as of #323985: Rules integration), however I think #353625: Display existing node access tables in user reference fields will be necessary for these two modules to work together.

danielb’s picture

Sounds interesting but as I don't know how to do this yet I might not get around to it for a while - so if you know anything, please post the info/code here or a patch.

mitchell’s picture

Title: Inclusion into Workflow module » Compatability with other node_access modules

@danielb: I think the main question is whether or not content_access makes compatible statements in the node_access tables, and if not, would it be wise to also integrate with ACL.

danielb’s picture

Title: Compatability with other node_access modules » Inclusion into Workflow module

I think the main question is whether we can integrate workflows

mitchell’s picture

The use case described above is possible with this module in its current form using Rules, its 'Populate a CCK field' action on the node access user reference fields according to a workflow, and #329500: support for looping and data lists. This works (I made a similar setup), but it seems awkward when there are actions specifically for updating node_access.

danielb’s picture

Status: Active » Postponed (maintainer needs more info)

I've looked into workflows and I can't find any info on how to provide this functionality, if you have any links with code samples etc... please post them here.

danielb’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

OK so this should definitly be possible to do either with Rules or a custom module that checks for the same things this module checks for. In that case I do not want to include this into the scope of this module.

lelizondo’s picture

I know this is more than a year old, but I am in the same situation and I feel like I need to share my solution.

I found 'Virtual Roles', a great module that assigns a 'virtual role' to a user depending on some context. In my situation, this would be something like "assign the current user the role 'foo' if he/she is added as a coauthor using the userreference of 'bar' node".

The module is not very easy to use since you must write some code and even some sql query and as a general use is better to avoid it, but it works.