The User Profile Override module allows site administrators to define which user additional field is visible and editable on user edit form by selecting checkboxes in user field edit form.
Site administrators can grant view or edit permissions to each system role.

Project page:

User Profile Override

Git clone command:

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/kladrian/2324283.git user_profile_override

Check with pareview

OK: http://pareview.sh/pareview/httpgitdrupalorgsandboxkladrian2324283git-7x-1x

Reviews of other projects

[D7] Role expose

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxkladrian2324283git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

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

kladrian’s picture

Status: Needs work » Needs review
kladrian’s picture

Issue summary: View changes
kladrian’s picture

Issue summary: View changes
pushpinderchauhan’s picture

Issue summary: View changes
pushpinderchauhan’s picture

Status: Needs review » Needs work
Issue tags: +PAreview: security
StatusFileSize
new17.65 KB
new90.96 KB

@kladrian, thankyou for your contribution.

Automated Review

Best practice issues identified by pareview.sh / drupalcs / coder. None.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
(*)May Be: Does not cause module duplication and fragmentation. As I goggled, I found two modules that looks similar to this module.
  1. Field Permissions
  2. User Field Privacy

Please add your comment how your module is different from above modules.

Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements
3rd party code
Yes: Follows the guidelines for 3rd party code.
README.txt/README.md
(+) No: Follows the guidelines for in-project documentation and the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
No. If "no", list security issues identified.
  1. (*) Your both menu URLs are publicly accessible as these can be accessible only by admin users.
     - admin/user-profile-override/toggle/%
           - admin/user-profile-override/toggle-all

    "'access arguments' => array('administer users'),": that permission is not defined by your module in hook_permission()? Also the permission name does not really fit?

Coding style & Drupal API usage
  1. (*) _user_profile_override_role_name_in_field_settings: Why @ used with @$field_instance['settings']['user_profile_form_by_role'], add your comment on this. Same with $show_in_profile_form = @$context['instance']['settings']['user_profile_form']; and $allowed_roles = @$context['instance']['settings']['user_profile_form_by_role'];.
  2. (+) user_profile_override_help: $base_img_path = ''; is empty as you are using it further to retrieve image that make your help page so terrible.

    Admin help page issue
  3. (*) Ajax error popup coming when I click to field icon as shown below.

    Fatal Error
  4. (+) user-profile-override.fields-overview.js: Use Drupal.behaviors in your js file.

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

Please don't remove the security tag, we keep that for statistics and to show examples of security problems.

However I am unable to review your complete module code and functionality as it producing fatal error, better to fix these first. One more thing, I am not a git administrator, so I would recommend you, please help to review other project applications to get a review bonus. This will put you on the high priority list, then git administrators will take a look at your project right away :-)

Thanks Again!

kladrian’s picture

Thank you a lot for the great review and for all effort you put on it. I (think) I've solved all issues you've reported.
I'll write down a list of all changes/fix I've made.

No duplication

Differences between User Profile Override module and Profile Privacy and User Field Privacy:
- only site administrators can decide which field can be viewd/edited by user
- only user with selected roles can be able to edit field
This can be useful when you need to add more information to user and you don't want user to see them or edit them.

README.txt/README.md

Rewritten using README Template. as you suggested

Secure code

- Changed permission name to administer site configuration as suggested by pareview
- Now calling both menu URLs give correctly "Access denied" page.

Coding style & Drupal API usage

  1. Use of @ sign commented and explained
  2. Use of empty $base_path - that was my mistake, removed images from help text
  3. Ajax error popup - a simple check of bundle was missing, this module is for user field only
  4. user-profile-override.fields-overview.js - removed javascript file, now changes of toggle-all icon is made by ajaxcommands

Thank you again, I hope this is better now.

kladrian’s picture

Status: Needs work » Needs review
kladrian’s picture

Added tests with simpletest framework.

kladrian’s picture

Issue summary: View changes
kladrian’s picture

Issue summary: View changes
sumitmadan’s picture

StatusFileSize
new52.39 KB
new23.66 KB

Hi kladrian,

Great efforts and cool module... But I feel that this needs a little change.

Suppose, I have a "editor" role. I have selected the "Display in user edit profile form" option for editor role for a field. The fields should be hidden for simple authenticated or other type of user, but it showing disabled field. I am saying it because what if admin doesn't want to display the field for other user.

kladrian’s picture

Issue summary: View changes
kladrian’s picture

Hi sumitmadan,

thank you so much for your review and your suggestions.

I've made a significant change in my module following your idea.

Now you can grant view and/or edit permissions for each system role.

After this change I've found useless all ajax icons in overview page, so I've replaced them with just an overview of which roles are allowed to view and edit each field.

Thanks again for your effort.

ankitgarg’s picture

Status: Needs review » Needs work
StatusFileSize
new14.47 KB

Hello,

Please review at least 3 projects and add the urls of reviews on your issue page so that community members will consider reviewing your code.

Module works fine for me. Just one little change. Indefined index notice are there, check first whether index exist or not. See attached image.

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

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