About:
Allows a site administrator to easily manage large role tables.

Installation:
Install module as usual. Enable at "/admin/modules".

Usage:

Bulk Options: Add (/admin/config/people/bulk_role_management)
-------------------------------------------------------------
Add (one line per row) as many role entity terms as desired. Simply copy &
paste your list in the "Add bulk role entities" box, click "Submit". The role
entities will be added to the "role" table in the database.

Bulk Options: Delete/Edit (/admin/config/people/bulk_role_management/edit)
--------------------------------------------------------------------------
After adding new role entities, your role entities will be listed on this page
for editing or mass deletion. If you want to edit (which will allow you to
rename the role entity), click the "rename" link. To mass delete, select the
role entities you wish to delete and click "Delete Selected". The role entities
selected for deletion will be removed from your "role" table and "users_roles"
table. Finally, the "permissions" link will take you directly to the role
entity's permission page. If you create a large list of role entities, don't
use Drupal global permissions edit page (the one that shows all permissions
for all roles as it will be too large to manage). Everything will work fine,
just easier to edit one role entity's permissions table at a time.

The user's edit page (/user/[uid]/edit)
-----------------------------------
The user's edit page is changed from having the section called "roles" to
"My groups, memberships and roles" with a drill-down textbox. This drill-down
will allow you to quick search your role entities and jQuery will autofilter the
results allowing for fast role entity table selections.

Project page:
https://www.drupal.org/sandbox/xandermar/2585505

Git link:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/xandermar/2585505.git

Drupal core version 7.0

Comments

xandermar created an issue. See original summary.

PA robot’s picture

Issue summary: View changes
Status: Needs review » Needs work

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

Fixed the git clone URL in the issue summary for non-maintainer users.

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.

xandermar’s picture

Status: Needs work » Needs review

Fixes completed.

JKingsnorth’s picture

Title: Bulk Role Management » [D7] Bulk Role Management
banviktor’s picture

Status: Needs review » Needs work

First off I would suggest you to format the issue summary with HTML tags, not a simple copy-paste from README.txt.

Automated Review

No automated test cases found!

Manual Review

Individual user account
Yes: Follows.
No duplication
Yes: Does not cause.
Master Branch
Yes: Follows.
Licensing
Yes: Follows.
3rd party assets/code
Yes: Follows.
README.txt/README.md
No: Does not follow. Please consider using the README Template.
Code long/complex enough for review
Yes: Follows.
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
  1. (*) The nbproject directory should not be in the repository.
  2. (*) .module line 107-113: Don't delete roles this way. Use user_role_delete() instead, as it will call the proper hooks and reset static cache (also removes permissions associated to the roles).
  3. (*) .module line 154: Don't add roles this way. Use user_role_save() for the same reasons as the previous point.
  4. (*) .module line 149: Get form values from $form_state['values'] whenever possible.
  5. bulk_role_management_help(): missing t() around strings.
  6. .module line 105: $form_state['values']['op'] could also be used (I see that more in core modules, so I guess that's considered to be best practice). Also use t() for the right side of the comparison too.
  7. Multiple instances of calling check_plain() on t()-ed strings. Calling check_plain() on them are unnecessary afaik.
  8. .module line 62-64: Instead of excluding role id 1,2,3 consider using DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID constants and variable_get('user_admin_role', 3) for the administrative role as it's not 3 on all sites.

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.

This review uses the Project Application Review Template.

xandermar’s picture

Status: Needs work » Needs review

Updated the mandatory items marked "*" and most of the recommends. Please review and advise next steps. Thanks!

ttronslien’s picture

Automated Review

Repeat issue (3 times?)

Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
Concatenating translatable strings is not allowed, use placeholders instead and only one string literal
Concat operator must be surrounded by a single space
Expected one space after the comma, 0 found

Results: http://pareview.sh/pareview/httpgitdrupalorgsandboxxandermar2585505git

I think you can get rid of your error messages by doing something like:
drupal_set_message( t('Duplicate role entity: @role_name', array('@role_name' => $role->name)),'error');

Manual Review

Individual user account

Follows

No duplication

Does not cause

Master Branch

Follows

Licensing

Follows

3rd party assets/code

Follows

README.txt/README.md

Follows

Code long/complex enough for review

Follows

Secure code

Yes: Meets the security requirements.

Coding style & Drupal API usage
I noticed 1,2, 3 and 4from https://www.drupal.org/node/2585527#comment-10457533 is completed. WTG.

Recommendations

Suggestions for README
- Not sure if TOC is required, since I don't find it to be that long of a readme file :)
- Under requirements there is "none" listed however under troubleshooting it says, "Ensure you have the right version of jQuery running". Maybe add jQuery version to requirements?
Other
- You may want to add t() around text in your module. Not required, but I see you have been fairly consisten elsewhere (e.g. Line 25 in .module file.)
- Personally, I don't think adding links or functions into the Heading is both accessible or user friendly, contemplate adding tabs like many other modules in the future?
- bulk_role_management.js line 13 $("#user-admin-roles").prepend("

hello

"); Missing World ;) I'm sure it's for testing, but you may want to do something else with it.
- Use drupal behaviour over document.ready https://www.drupal.org/node/171213

xandermar’s picture

@ttronslien - If I get the three issues you mentioned resolved, will this module be approved? I have a customer for whom I'm eagerly trying to get into production and am curious to next steps. I guess what I'm trying to say is that I'd really like to get this module released and usable by the community (out of sandbox) as I have many others that I will be adding very soon and want to make sure I do everything that is required as soon as possible.

Any advice is greatly welcomed. Thanks!

ttronslien’s picture

To be honest, I have no idea at what point the module can be approved. I am brand new at this. I'm trying to sift through the documentation to actually get a clear sense of at what stage in the review process an application can be moved forward to the next stage. In the end though, it is a git administrator (and that is not me) that will give you the final approval. As the documentation for modules to reach project status suggests, it can take up to a year to have a module approved. I have however heard that is helps moving the process along if you yourself is participating in code reviews.

A module does not have to be approved by the community for you to use it with your clients though, although I do see the benefits and the credibility it provides.

xandermar’s picture

@ttronslien - Thanks for the feedback! I will continue to dig in and help with code reviews :)

xandermar’s picture

Complete and ready for review.

xandermar’s picture

Status: Needs review » Reviewed & tested by the community
xandermar’s picture

Priority: Normal » Major

Bump

apaderno’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for your contribution!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thank you, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks go also to the dedicated reviewer(s) as well.

xandermar’s picture

Thank you!

Status: Fixed » Closed (fixed)

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