[1.0.x] CAS User Ban

Created on 18 July 2025, 2 months ago

The CAS User Ban module prevents the creation of users based on their CAS username.

The module is useful for sites using CAS protocol in the authentication system to prevent spam from users.

Project link

https://www.drupal.org/project/cas_user_ban โ†’

๐Ÿ“Œ Task
Status

Needs review

Component

module

Created by

๐Ÿ‡ช๐Ÿ‡ธSpain aaron gil martinez Zaragoza

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @aaron gil martinez
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vishal.kadam Mumbai
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    Thank you for applying!

    Please read Review process for security advisory coverage: What to expect โ†’ for more details and Security advisory coverage application checklist โ†’ to understand what reviewers look for. Tips for ensuring a smooth review โ†’ gives some hints for a smoother review.

    The important notes are the following.

    • If you have not done it yet, enable GitLab CI for the project, and fix what reported from the phpcs job. This help to fix most of what reviewers would report.
    • For the time this application is open, only your commits are allowed. No other people, including other maintainers/co-maintainers can make commits.
    • The purpose of this application is giving you a new drupal.org role that allows you to opt projects into security advisory coverage, either projects you already created, or projects you will create. The project status won't be changed by this application.
    • Nobody else will get the permission to opt projects into security advisory policy. If there are other maintainers/co-maintainers who will to get that permission, they need to apply with a different module.
    • We only accept an application per user. If you change your mind about the project to use for this application, or it is necessary to use a different project for the application, please update the issue summary with the link to the correct project and the issue title with the project name and the branch to review.

    To the reviewers

    Please read How to review security advisory coverage applications โ†’ , Application workflow โ†’ , What to cover in an application review โ†’ , and Tools to use for reviews โ†’ .

    The important notes are the following.

    • It is preferable to wait for a Code Review Administrator before commenting on newly created applications. Code Review Administrators will do some preliminary checks that are necessary before any change on the project files is suggested.
    • Reviewers should show the output of a CLI tool โ†’ only once per application. The configuration used for these tools needs to be the same configuration used by GitLab CI, stored in the GitLab Templates repository.
    • It may be best to have the applicant fix things before further review.

    For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues โ†’ .

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    I do not have time for a complete review, but the following point should be fixed.

    Since Drupal\cas_user_ban\Controller\BannedUsersListController does not use methods from the parent class, it does not need to use ControllerBase as parent class. Controllers do not need to have a parent class; as long as they implement \Drupal\Core\DependencyInjection\ContainerInjectionInterface, they are fine.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vishal.kadam Mumbai

    1. FILE: cas_user_ban.module

    /**
     * Implements hook_form_FORM_ID_alter().
     */
    #[LegacyHook]
    function cas_user_ban_form_user_cancel_form_alter(&$form, FormStateInterface $form_state): void {
    /**
     * Implements hook_form_FORM_ID_alter().
     */
    #[LegacyHook]
    function cas_user_ban_form_bulk_add_cas_users_alter(&$form, FormStateInterface $form_state): void {

    The description for this hook should also say for which form that hook is implemented, either by indicating that with the name of the class that implements the form (namespace included) or the form ID (which is usually indicated by getFormId()).

    /**
     * @file
     * Module file for cas_user_ban.
     */

    The usual description for a .module file is โ€œHook implementations for the [module name] moduleโ€, where [module name] is the module name given in the .info.yml file.

    2. FILE: src/Controller/BannedUsersListController.php

      /**
       * The controller constructor.
       */
      public function __construct(

    The documentation comment for constructors is not mandatory anymore, If it is given, the description must be โ€œConstructs a new [class name] objectโ€, where [class name] includes the class namespace.

  • ๐Ÿ‡ท๐Ÿ‡ดRomania bbu23

    Hi, thanks for applying!

    The branch 1.0.x contains only one commit from the applicant. It does not meet the requirement of commits per branch to proceed with this review.

  • ๐Ÿ‡ท๐Ÿ‡ดRomania bbu23

    After reviewing the project code, I didn't find any additional issues beyond those already reported. Once those are addressed, this gets a +1 RTBC from me.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain aaron gil martinez Zaragoza

    Hi,

    Thanks for the review, I have applied the requested changes.

    Can you have a look, please?

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vishal.kadam Mumbai

    Rest seems fine to me.

    Please wait for other reviewers and Project Moderator to take a look and if everything goes fine, you will get the role.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    src/Controller/BannedUsersListController.php

    Since that class does not use methods from the parent class, it does not need to use ControllerBase as parent class. Controllers do not need to have a parent class; as long as they implement \Drupal\Core\DependencyInjection\ContainerInjectionInterface, they are fine.

    src/Form/BanUsersForm.php

    The class does not use any method from the parent class. A form does not need to have FormBase as parent class: as long as it implements the required interface, it is fine.

Production build 0.71.5 2024