Hi everybody,

I enabled both the "Privacy Per User: Flag Friend" and "Privacy Per User: Profile" modules with Privacy Per User module. But, when I choose the "share with friend only" privacy from edit page, my friends can not see my profie. Friends see"Access denied
You are not authorized to access this page." information. I think, I am missing something. Anybody can help me?

CommentFileSizeAuthor
#17 privacypu_user_relationships.zip1.08 KBvishun

Comments

gilgabar’s picture

Make sure all of the roles that should be allowed to see profiles also have the permission 'access user profiles'.

mrcaos’s picture

Yes, access use profiles is selected for "authenticated users". Shall I do anything with flag module for using Privacy Per User: Flag Friend?

gilgabar’s picture

Can you confirm that you are able to control access to the profile using a different privacy state? So if you set it to public, for instance, does that allow the friend user to see the page?

mrcaos’s picture

Do you mean user permissions? I couldn't understand anything about "set it to public". Just I set the "share with friend only" privacy from edit page.

gilgabar’s picture

On your user edit page set the profile privacy settings to 'Share with everyone' (that is the same as public). Confirm that other users can view your profile.

mrcaos’s picture

Yes, they can.

gilgabar’s picture

Ok, great. It sounds like Privacy Per User is working correctly. The next place I would look is to make sure you are actually friends with the user you are expecting to be able to see your profile. If you go to http://mysite.com/user/[uid]/friends where [uid] is your user's id you should see the user that should be your friend in that list. If they are not there or if they are listed on http://mysite.com/user/[uid]/friends/flagged or http://mysite.com/user/[uid]/friends/pending then they are not actually friends with your user yet and thus will not be granted access to your profile.

mrcaos’s picture

Hi Gilgabar,

I tried waht you said. Whan I tried the "http://mysite.com/user/[uid]/friends" I realized that I haven't got any friend, but I check this from "My relationships" I can see my friends. I thing my realtionships is nonsense. In this case, what should I do? How can I bound "My relationships" and other friend status (I mean http://mysite.com/user/[uid]/friends)?

gilgabar’s picture

Do you have the Flag Friend module installed or are you using the User Relationships module? Support for Flag Friend is included currently, but support for User Relationships is not yet included because I don't use it. It should be easy to add though if you want to turn this into a feature request.

mrcaos’s picture

I am using Flag Friend, it is also istalled. But, I did no make anything with flag friend after I installed it. Do I need any setup for flag or something like that, after the intallation?

mrcaos’s picture

Category: support » feature
Priority: Normal » Major

As you know the "Privacy for User" module can be used with "flag friend", but we are trying to use this module with User Relationsships module. Is it possible to add the feature, using relations of User Relationships, in "Privacy for User" module?

gilgabar’s picture

Title: Privacy Per User: Flag Friend Doesn't Work » Support the User Relationships module

Updating the title to better reflect the status of this issue.

vivekchakraverty’s picture

i would also like to use privacy per user with user relationships

gateway69’s picture

Ill add a + to that.. we use UR quite a bit in our new social site we are working on,

You mention that it wouldn't be to hard can you give us some pointers in code whee we could incoprate this and hell if we get it working properly provide a patch to the community.

gilgabar’s picture

Yes, there is a hook. Take a look at the flag friend implementation to see how simple it is. Also see the section 'Defining Privacy States' in the readme.

I would recommend putting it in a submodule called privacypu_ur, similar to the flag friend submodule. It just needs an info hook and a callback function that returns true if the current user and the passed-in user account are friends. UR might even have a function you can call to determine whether two users are friends, so it may be even easier than the flag friend implementation. Let me know if you have any questions. Happy to add it here if you put it together and test.

gateway69’s picture

Thanks for the quick reply, we will deff start to work on this, ill keep you in the loop as to where we go.. ideally we would have some sort of pull down selection per block aka think of a user profile thats like private, friends, public where a user could select what they want to show off, of course this gets kinda crazy cause outside of the profile we have things like hb stream where you have a similar fb style stream post etc.. but hopefully we can use this and build a UI around it for our users.

cheers

vishun’s picture

StatusFileSize
new1.08 KB

Definitely was easy to implement, thanks for creating a nice framework.

vishun’s picture

Status: Active » Needs review
gilgabar’s picture

Status: Needs review » Fixed

Thanks vishun. Committed and should show up in a dev release shortly.

vishun’s picture

Awesome! Happy to help.

gateway69’s picture

Good stuff guys!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

codesidekick’s picture

Status: Closed (fixed) » Fixed

I've gone ahead and created a module that integrates User Relationships with Privacy Per User however because I'm not yet an approved Drupal module contributor it's in sandbox.

http://drupal.org/sandbox/interactivejunky/1478918 has the sandbox for the module. It's solid and all coder formatted and Drupal coding standards. The module allows the site administrator to select which user relationships are available to the Privacy Per User module in the Privacy Per Users settings page.

gilgabar’s picture

This looks like a nice improvement. Would you be interested in including it with the main privacypu module or do you prefer to maintain it separately?

If you provide a patch I'd be happy to add the extra argument handling to state callbacks too.

codesidekick’s picture

I think there are still a few useful features that can be added to the submodule over time to support more types of User Relationships so it might be good to keep it separate for the time being (I'm working on a commercial project that makes a lot of use of it). If you have time to review the module I'd appreciate it a lot http://drupal.org/node/1479034 (it's hard work getting modules approved now-a-days).

In the current 6.x version I've created a form theme that changes the controls to look more like http://drupal.org/files/20120113-j3rkxr4849m7tm62exfbdsdqtj.jpg (a bit more Facebook if you like) - if you're interested in any of that I'll be happy to share once I've finished testing.

I think the Privacy Per User module is really important for social sites on Drupal and combined with the Profile Privacy module I think there'd be a fair amount of demand for it in Drupal 7 as well.

I've been talking to the Drupal Commons team about the possibility of including this as a feature (where it could be really useful) however for that there'd need to be a tried and tested 7.x version. Would you be interested in collaborating to make that happen?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jasimenhot’s picture

Fundamental concept of sales and marketing team is looking for prospects, costumer, building close relationship and defend consumer.
cute sayings | friendship messages