We’re using GitLab CE for git for a range of engineering classes at the University of California, Santa Cruz. For various reasons, we don’t want to use IMAP for user authentication. However, we want to ensure that students sign up with a username that matches their “official” UCSC email address so we can match assignments with student rosters.
The solution I came up with was to modify signup_domain_valid? to take a pseudo-domain: require_user_email_match. If this domain is listed, the user name is only valid if it matches the user portion of the email address. It’s a short patch (fewer than 10 lines of code), but very useful for our setup.
Any chance this could be added to the codebase? It might prove useful for other universities, and it’s much simpler than integrating with IMAP. It also makes it easier for students to reset their own passwords without going through the central password system.