This module creates an Action plugin that can assign/update a user's group role for multiple groups in once.
When you are managing a site with many groups, it could be painful to update a user's role for multiple groups, e.g. giving a user admin role in tens of groups, which requires changing configurations repeatedly for each group . This module provides the capability to update a user's roles for as many groups as you want in one time.
Project link
https://www.drupal.org/project/group_bulk_operations
Git instructions
git clone --branch '2.0.x' https://git.drupalcode.org/project/group_bulk_operations.git
Comments
Comment #2
sivakarthik229 commentedComment #3
andrei.vesterliHello @sivakarthik229
Thank you for your contribution and for the application for security advisory coverage. You did a great job!
I've reviewed this module and here are some things to fix/look at:
src/Form/AssignGroupRoleMultiple.phpissue: you have this construction:
I suppose that you need to change
$nodesto$groups.src/Form/AssignGroupRoleMultiple.phpissue: the class file is named
AssignGroupRoleMultiplebut you named the constructor method like:Please, give it a proper description.
src/Form/AssignGroupRoleMultiple.phpissue: you have this construction
$this->storage = $this->entityTypemanager->getStorage('group');. It will be more informative to change the property to$this->groupStorage.src/Form/AssignGroupRoleMultiple.phpissue/suggestion: you have an implemented batch under the
submitForm()method. I see that the batch operation and the finished callbacksgroup_bulk_operations_batch_add_member/group_bulk_operations_batch_add_member_finishedare placed insidegroup_bulk_operations.modulefile, which is not the best practice. A suggestion will be to move both callbacks into a service class or the form itself:group_bulk_operations.moduleissue: both functions
group_bulk_operations_batch_add_memberandgroup_bulk_operations_batch_add_member_finishedhave missing@paramsdescription and also the argument types. Please, provide them.src/Plugin/Action/AssignGroupRole.phpissue: the class name is
AssignGroupRolebut the constructor description is:Please, set a proper description.
composer.jsonfile. Take a look at this document on how to implement it.There might be something else but this is what I've found on my first look.
Regards,
Andrei
Comment #4
andrei.vesterliComment #5
sivakarthik229 commentedHi @andreivesterli,
Thanks for the review.
I have fixed all the reviews suggested by you and those are in the latest default branch.
Please review it and let me know incase any changes needed.
Thanks
Siva
Comment #6
andrei.vesterliHello @sivakarthik229
Thx! yeah, now is much better!
Let's see who else will write feedback but overwise it's ok for me. Nice job!
Regards,
Andrei
Comment #7
cmlaraComment #8
cmlaraLooking at the commit history it appears that prior to opening the application there was only a single commit by the applicant to the project of only 22 lines. This commit occurred shortly after the applicant was granted access through the process for adopting modules not compatible with D9.
The commit history has increased since the application was opened, however I would recommend care in ensuring that only code the applicant created is used for the review.
Comment #9
sivakarthik229 commentedHi @cmlara,
I have added new feature for the module, like the admin can remove the user from multiple groups which was not present in D8 version.
I have followed the Drupal coding guidelines and modified the code accordingly to the best of knowledge.
Thanks
Siva
Comment #10
Le Vo Trung Hieu commentedHello @sivakarthik229,
1.I was view modules and use drupal-check bug report. Below are details when I ran scan
2.I ran Drupal coding standards check code
Comment #11
sivakarthik229 commentedHi @le-vo-trung-hieu,
I have fixed the phpstan errors in the latest default branch.
For the phpcs errors, I haven't received any of them in my cli, may be those are whitespace changes in windows.
Please review once the module and provide the feedback for the phpstan errors.
Thanks
Siva
Comment #12
avpadernoThe Group module isn't a Drupal core module.
A confirmation form just asks confirmation about an operation. Its task isn't asking users to submit values, or select values.
Comment #13
sivakarthik229 commentedHi @apaderno,
I have modified the code and used FormBase class instead of ConfirmFormBase class, to take the input from user.
Please review the module once and provide your feedback.
I have verified the PHP codesniffer and phpstan issues also in the latest code of the module.
Thanks
Siva
Comment #14
andrei.vesterliComment #15
avpadernoComment #16
avpadernoThank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. 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.
Thank you to all the reviewers.
Comment #17
andrei.vesterli@apaderno thx for a quick reaction!