Module name
Privacy Per User: User Relationships integration

Description
Allows site admins to create Privacy Per User settings based on User Relationships as requested in the issue thread http://drupal.org/node/1240540 .

Sandbox link
http://drupal.org/sandbox/interactivejunky/1478918

Drupal core version
6.x

This module is particularly useful for users building sites in Acquia Drupal Commons as there's currently no appropriate way of assigning Privacy Per User features based on User relationships (which is common web community privacy functionality).

Comments

jpontani’s picture

Status: Active » Needs review

Setting to review.

patrickd’s picture

welcome,

Please take a moment to create a README.txt that follows the guidelines for in-project documentation.

while waiting for an in-depht review of your module you can start out fixing some coding style issues detected by automated tools:
http://ventral.org/pareview/httpgitdrupalorgsandboxinteractivejunky14789...

You can also get a review bonus and we will come back to your application sooner.

regards

codesidekick’s picture

Thanks,

I've followed the review steps detected by the automated tools and committed. Look forward to a more indepth review.

novalnet’s picture

Hi,
Manual Review :

1. project page is too short, see http://drupal.org/node/997024.
2. privacypu_user_relationships.module => contains indent errors and also remove all the whitespaces at end of line.
3. Inline comments must end in full-stops, exclamation marks, or question marks.
4. You should PARREVIEW your script. You have many errors.
See http://ventral.org/pareview/httpgitdrupalorgsandboxbpadhu1333838git.
5.README.txt is missing.
6. Please mention git clone link in project page.

codesidekick’s picture

Hi Novalnet thanks for your review:

  1. I've added a new section that contains more detailed information about the functionality of the module.
  2. I've now removed all white-spaces detected by PARreview
  3. Inline comments are now correctly punctuated
  4. This is not my module but somebody elses (a SOAP module?). My modules Ventral report is available at http://ventral.org/pareview/httpgitdrupalorgsandboxinteractivejunky14789... .
  5. The git clone is now in the project page :)

Thanks for your time in reviewing the module, I'll hopefully get to review some other modules tonight to repay the favour to the community.

codesidekick’s picture

Status: Needs review » Fixed

Updated status to fixed (is that right?).

patrickd’s picture

Status: Fixed » Needs review

Not yet, have a look at the workflow of project applications.

avpaderno’s picture

Priority: Normal » Critical
lva’s picture

Priority: Critical » Normal
Status: Needs review » Needs work

Hi,

I had a look at your code. Some minor comments:

  • Line 44: I would recommend to change this line with something like the following: 'title' => t('Share with @title', array('@title' => $relationship_title)). This allows translators to play with where they want to have the title. In your code, the title can only be placed at the end.
  • Function privacypu_user_relationships_form_alter(): if you only have 1 "case" in a "switch" structure, then it is better to use "if" or implement hook_form_FORM_ID_alter() instead of hook_form_alter().

When I checked out your code for git, I only found a README.txt file. This is because there exists still a master branch which is also set as the default branch. Make sure to set the correct default branch: http://drupal.org/node/1659588 . Then remove the master branch, see also step 6 and 7 in http://drupal.org/node/1127732

patrickd’s picture

Status: Needs work » Needs review

good catches - but as you said minor - so don't set needs work

codesidekick’s picture

Hi there,

Thanks Iva for the code review. I've updated my module code and re-run it through ventral. Also deleted the Master branch using the tutorials you provided.

Marty

tglynn’s picture

Status: Needs review » Reviewed & tested by the community

PAReview looks good.

Topic of module looks original after searching on d.o.

Because the module is so short, I tried install the module to see if it'll work. One of the dependencies of the module is user_relationships_api, which drush and I cannot find. The dependency as list in your information file is the particular module you want, but unfortunately drush cannot find it until I downloaded user_relationships first. You may need to list user_relationships first.

On line 101 of the .module, you do not provide options, which I think was the reason when I got to the settings page I see the fieldset but have not options. You may want to have a message there telling the user a warning message that if they don’t have any user relationships that they won’t have options here.

On line 58 you say the function is a callback for hook_privacypu_states_info() but the name of your function is privacypu_user_relationships_privacy_state($account, $rtid). That’s a different function it seems, seeing as it ends in “states_info” and not “state”. It's clear you just made a typo in your documentation.

The module as it is is only 115 lines, including commands and blank lines. I think if you added more code to the module so that we can more clearly see what you can do, that would have made my decision easier about moving it to the next step. Please clear up the few issues mentioned above. But otherwise, I think the module looks good. So even though it's very short, I'm marking this as reviewed.

codesidekick’s picture

Thanks tonioman, I really appreciate you having a play with the module, especially because it requires a bit of set up.

I've added a courtesy message now in case no User Relationships exist which says "Currently no user relationships exist." and tidied up some of the code.

It's a small module but pretty useful, if this makes it through review I'll aim to get it ported to Drupal 7 and work with the D7 maintainer of Privacy Per User to get a stable release up - I think more and more clients are expecting 'Facebook style' privacy settings from their community sites now.

Thanks again for reviewing it! Much appreciated.

klausi’s picture

Status: Reviewed & tested by the community » Postponed (maintainer needs more info)

Sorry for the delay, but you have not listed any reviews of other project applications in your issue summary as strongly recommended in the application documentation.

Review of the 6.x-1.x branch:

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    FILE: /home/klausi/pareview_temp/privacypu_user_relationships.module
    --------------------------------------------------------------------------------
    FOUND 2 ERROR(S) AND 1 WARNING(S) AFFECTING 3 LINE(S)
    --------------------------------------------------------------------------------
      58 | ERROR   | Function comment short description must be on a single line
     111 | WARNING | Line exceeds 80 characters; contains 82 characters
     117 | ERROR   | Expected "if (...) {\n"; found "if(...) {\n"
    --------------------------------------------------------------------------------
    

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

manual review:

  1. This project is too short to approve you as git vetted user. We are currently discussing how much code we need, but everything with less than 120 lines of code or less than 5 functions cannot be seriously reviewed. However, we can promote this single project manually to a full project for you.
  2. Looks like the privacypu project already has a submodule with the name privacypu_user_relationships? So I guess your functionality could be merged into the main module, or has already?
PA robot’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

I'm a robot and this is an automated message from Project Applications Scraper.