Hi,
I installed your module. It seems exactly what I need ;-)
But I can't manage to make it run.
OK, I installed the module togehter with nodeaccess (I hope this is a good combination?)
IN nodeaccess I just set only access to my content type for the author.
Now I included a noderefference and a userrefference-field (CCK).
I can create content as userX - and no other user can see this content. The bad thing: also the "assigned" user can't.
What is wrong?
Kind regards
Kai
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | crm-reference.png | 14.64 KB | vistree |
Comments
Comment #1
kenorb commentedI don't know nodeaccess exactly, but when I reviewed different kind of node access modules, I've chosen view_own module.
You can do two things:
1. Disable nodeaccess and install view_own and configure which permission on view_own user should see. I.e.: view any page
2. Go to admin/settings/nodeaccess_autoreference and enable: 'Show connection messages.'
Go to the node with the user which have no access to it, and send me what was the message.
If the referenced path was found or not.
We can find out why it doesn't work with nodeaccess.
Comment #2
vistree commentedOK, I will do. Thanx for reply!
Just one question in advance: will a referenced user get access only to "child" nodes or also to parent nodes? E.g.
content type company
content type task (with userreference to deligate person, and nodereference to company)
content type noteontaks (with nodereference to task).
If I create now a task with the connection to the "parent" company (and access for userX) and also a note for this task (with reference to the task), will userX see only task AND noteontask, or also the "parent" company (where is no userreference field inside)?
Kind reagards
Kai
Comment #3
kenorb commented1.
direct userreference connection, module should give automatically view access on the fly, when node would be not accessible for him
2.
Currently for nodereference connection, there is support only for content profiles. I haven't think in this way. But it's very easy to implement it. Look for the next post.
3.
Let me think about that, because I'm not sure.
Can you try 'Check permission via owners.' activate option if this will help?
Comment #4
kenorb commentedA.D.2:
http://drupal.org/cvs?commit=245352
You may download this version of file:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/nodeaccess_...
And re-test it.
I've made support for all type of connection of nodereference (not only user profiles).
Comment #5
kenorb commentedCan you explain how deligate person is connected to company? If 'content type company' is a user profile or all deligate persons within one company are connected to company through nodereference?
Comment #6
kenorb commentedTo implement 3rd method of access, it will be a tricky one.
You have to check connection by reverse-references.
Created new feature for that: #536502: Permission based on reverse-references
because it will be not easy one.
Comment #7
vistree commentedHi kenorb,
thank you for the new version. I have tried out directly and can give the following feedback:
1. I deinstalled nodeaccess and installed view_own
1a. view_own, I gave the permissions to view "any content types" and "own content" for all roles (without Guest).
2. Configuration of nodeaccess_auto_reference is as you told me (Show connection messages + Check permission via owners)
3. content type with userreference and nodereference
4. As assigned user I recieve the following message for the linked node:
Connected: NO; Path between user 3 and node 19: n/v
OK, some explanations on the "parent" question:
I want to build up something like a small CRM.
I have a team of 5 independent user. I want each of them to build up there own addressbook (customers) with related tasks and notes (via userreference). To display everything in a nice way, I created some views, where each user finds lists for custumer, tasks and notes. Opening a customer also displays all related content (tasks and direct notes on customer). Opening a tasks displays also all related notes and through the noderefernece also the customer (as link).
All this content has to be private. But now I want the user to assing tasks to other users. So I am in the hope, that your module is the right one for this ;-)
Therefore I created a CCK-userreference FOR tasks!! Because, the task is the element, I want to share wiht other users.
OK, if I share a task, I also want to share all notes on this task (notes contain a nodereference to this task - which therefore are childs of the task). As they are all relevant on the shared task, I see no problem in sharing the notes as well.
Last, but not least, it would be great, when sharing a task, also the FIRST parent of the task - the special customer - would also viewable for the assigned user (assigned through the userreference in the task). But I don't want that the simblings of a task (childs of the equal parent-customer) are also viewable for the assigned user (have still to be private or to be shared with other users).
Sorry for my bad english, but I hope you understand my idea.
Kind regards
Kai
Comment #8
vistree commentedHmm, as an additional feedback to your new version:
if I remove also view_own, there are changes.
UserX now seems to be linked by the module:
Connected: YES; Path between user 4 and node 15: Array ( [0] => 0 )
But now also the parent and all the direct childs of the parent are viewable. The direct childs of the task are fine ...
What is wrong in my view_own-settings?
And is there a way to connect only the direct parent of the task (containing the userreference?).
Kind regards
Kai
Comment #9
kenorb commentedProbably I know what you mean.
I'm happy to help, but I need some time to understand how everything could be implemented. References and referenced permissions are one of the most complicated things I think.
I was looking as well for similar solutions and I couldn't find. I've tried as well nodeaccess_nodereference and nodeaccess_userreference. But there you have only permission based on static and single references, and you have to use both of those modules (they don't cooperate together) and are not finished yet.
So probably this module will be the best for you.
It will be great if you consider to create some referenced map. Please download UML software (I'm preffer Dia - http://projects.gnome.org/dia) and create some permission map similar to this:
http://drupal.org/node/520062
It will takes few minutes and probably it will save a lot of time for you and for me as well.
Because I can see now, your project will be a complicated one. And you will spend a lot of time configuring your permission, who should see what.
Comment #10
kenorb commented#8
Path: Array ( [0] => 0 )
means that it was found by owner permission.
So node 15 have path to that user through owner of UID 0 = Anonymous.
It will be best, if you disable 'Check permission via owners.' option for now, probably you will not need that and I haven't test that a lot.
Then rebuild permission and re-test it.
Comment #11
kenorb commentedI already fixed one small bug:
http://drupal.org/cvs?commit=245360
When you had 'Check permission via owners.' option, other paths were not considered.
File to update:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/nodeaccess_...
So using 'Check permission via owners.' option, path detection could be wrong, even it was there referenced path.
Comment #12
vistree commentedOK, tried to create a small illustration. As I don't know how to embed it in my comment, I attached it.
Kind regards
Kai
Comment #13
vistree commentedHmm, I tried out now several combinations with view_own or with nodeaccess as replacement of view_own. But I don't manage to make the referenced content visible for the related user. Did you allready manage to use the module together with view_own??
In my case, only the real own content is visible for the users - not the assigned one. How did you set up view_own?
Kind regards
Kai
Comment #14
kenorb commentedI'm already using it with view_own combination.
I divided permission problem for 3 cases before.
Please test each one separately, because those are not the same.
Enable view_own module, select only permission 'view own something...' that those user will not have any view access to any of nodes.
Then, enable message setting and test it:
1. first with node which is directly referenced (if the path has been found).
In your case deligate person should see task which one has been referenced through userreference field.
Check the path, if it doesn't work, send me what was the path message.
2. test on noteontaks (with nodereference to task).
And the same, check the path, if it doesn't work, send me what was the path message.
If you not separate those different cases, it will be not possible to diagnose anything and you will fail with your configuration.
As I told you, references are complicated things, you can't keep disabling and enabling modules.
Just choose view_own, disable nodeaccess, enable 'view own some_types...' and make a full diagnostics what is wrong (checking the paths) and what already is working. Make it step by step, what is working already, what need to be done and what kind of functionality is missing.
Comment #15
vistree commentedThank you again,
OK, the problem seems to be the views-module. The assigned nodes are not in the views-list. If I open directly with the URL, everything is fine - and after opening, they also appear in the views list.
So, this is great!!!
The last "open" question therefore is, if it is possible to also "Link" the first parent (without his childs). Do you thing there might be a solution for this or is it technical impossible?
Have a nice evening!
Kai
Comment #16
kenorb commentedModule give permission in two ways:
1. when node has been opened, then permission is checked if user should see that node or not.
That's why it appeared on your View list.
2. when node permissions are rebuild (admin/content/node-settings)
Permission could be considered as well when reference field is updated, but it's a another feature.
To access parent nodes, it's possible to do that.
Currently I'm working on that.
It's related to this feature: #536502: Permission based on reverse-references
Comment #17
kenorb commentedParent support added as well.
Select 'Check permission via owners.' option to activate it.
Thanks for reporting.
Comment #18
kenorb commentedChecking the permission of nodes on views are fixed now.
Problem with Node Access should be fixed as well.
http://drupal.org/cvs?commit=271820
http://drupal.org/cvs?commit=271870