Quick question. Is it possible to create a view of nodes viewable only to the people I have a relationship with, thus, making this view unviewable to those I do not have a relationship with? I can do this with the buddylist module but have not figured it out with the user relationship module. I have tried using arguments within views...to no avail. Is this currently possible? Any ideas?

thanks,

wim

Comments

sprsquish’s picture

There are two filters that can be used.

User Relationships: Author's relationship with Username
This will allow you to set a specific username to match. So when using the view you'll only see nodes from the specified user.

User Relationships: Author's relationship with Current User
This does the same except that instead of specifying a user it'll use the currently logged in user. Meaning that when using the view the current user will only see nodes of other users he/she is related to.

battochir’s picture

Thanks for the reply. The 'User Relationships: Author's relationship with Current User' is something I had not thought of previously. However, what I think I'm looking for is something a bit more robust. For example, your suggestions work perfectly for the appropriate view...which was actually my question. However, I've found that if I type in the URL of a node in question, I still get access to it. Here is what I mean.

Say, 'A' and 'B' have a relationship with one another and it's two-way. I create a view that only shows nodes between users who have a relationship with one another. 'A' creates node/1 and with my view, only 'B' can see it. Well, that's actually not entirely true. Using the view, yes only 'B' can see node/1. However, when user 'C' types www.mysite.com/node/1 into the browser, they can see node/1 even though the appropriate view would not show it to them. I know, this is the realm of an access module such as the nodeaccess or acl/content modules.

So, my earlier question was incomplete...however you answered it completely. Thanks. My new question is...will there be some sort of access control integration or functionality that will be added to the relationships module that can control node access entirely based upon the relationships users have with one another? I know, plug-ins could be written. But, one thing I've learned while using drupal, and I've used it a long time, is that the lead developers/creators of a module have the final say on the direction of future development. Is such functionality in your future plans for this module? By the way, this is a very kick-ass module. You've come up with a very clever idea at helping to map interaction between users. Thanks.

cheers,

wim

sprsquish’s picture

I see exactly what you're saying. I have access control on my todo list. It's definitely a feature others are looking for and one I'm interested in implementing.

I'm very happy to hear that you like the module. Be sure to spread the word!

battochir’s picture

Thank you for such a quick response. I'm very happy to know you have an interest in taking the relationship module in such a direction. I think that the current possiblities your module offers, not to mention it's current integration with other modules such as views, will create a very powerful package wanted by many when access control is added. From what I have read around drupal land, the relationship module is being already viewed as a leaner, next generation alternative to the ever popular buddylist. That's not a small accomplishment. Nicely done. By the way, you're aforementioned integration with views is very, very nice. Allowing a module such as relationship to access the functionality of other modules is a very nice way to increase it's appeal...which you have already done. Thanks.

cheers,

wim

sprsquish’s picture

Status: Active » Closed (fixed)

Closing the issue. Access control thread is here: http://drupal.org/node/174895