I'm using node relativity and node relativity access control with workflow. This much works, allowing users that have access to the parents also have access to the children nodes in the appropriate workflow states.

When I incorporate workflow fields (which is fabulous by the way!), the users who have access to the parents can still edit the node, but all fields are missing because workflow fields doesn't recognize them. Is there a way to either:

A) automatically give all users who have inherited permissions for the node have the same permissions as the author?

or

B) add those node relativity access users who inherited permissions to be listed along with the roles in your workflow states, to be granted view/edit permissions along with everyone else?

I'm desperate at this point and willing to do a temporary hack to enable their permissions, I just don't know where to begin looking.

Comments

cindyr’s picture

Status: Active » Postponed

Trying to figure out how much of this is due to blonde user error....

cindyr’s picture

Status: Postponed » Active

Nope, I've confirmed it, it's a problem, but I have a bit of a permissions nightmare site anyway:

I use CCK User Reference fields to identify additional "viewers" and "editors" per individual node.

NodeAccess_UserReference assigns permissions to those people. This gives them the ability to view or edit the node.

Node Relativity allows me to associate children with the (parent) node, using a different node type with different cck fields.

Node Relativity Access Control allows me to cascade permissions - all the extra viewers and editors for the parent node inherit the same permissions for the children nodes (generic view/edit ability).

Workflow is used to set up 3 unique stages for the nodes: under development, submitted for review, published. Up to this point, everything magically works as it should.

Workflow Fields is used to fine grain what information is visible in the different stages. This works for viewers and editors added to each individual node, because those are listed in the workflow fields states, I can assign them the view and edit permissions per field. However, they aren't functioning properly for the users who should have inherited permissions. I think this is due to those users not being recognized as having an inherited role.

Is there any way you can get it to recognize the inherited roles from node relativity user access? I mis-represented it in the original post (option A): they can't have the same permissions as the author; the inherited roles need to be added to the list of user roles in the workflow field states.

infojunkie’s picture

I've been thinking of adding a hook to let 3rd party modules define their own permission mechanisms to Workflow Fields. In your case, once this would be in place, we would add a small module to connect Node Relativity user access to Workflow Fields.

However, I can't guarantee the timely delivery of this. You have 3 options:

* Hack _workflow_fields_compute_permissions to add your own logic that sets $visibles[$row['name']] and $editables[$row['name']] to TRUE or FALSE depending on whether the current user has inherited Node Reltivity permissions or not - per field ($row['name'] is the field name).

* Implement the new hook discussed above that I can commit to the module. We can discuss the design here and I would be very grateful!

* Hire me to do the job. It should take me a couple of days and I will be available starting mid-next week.

infojunkie’s picture

Category: support » feature
cindyr’s picture

Status: Active » Closed (fixed)

Per offline conversation, closing because I don't need this now. My solution: use a Triggered Rule to execute custom PHP code that adds the inherited role to the user when the child node is created or the parent node is updated.