Skip to content

GitLab

  • Menu
    • Projects Groups Snippets
      Help
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !8242

Closed
Created 10 years ago by Administrator@rootOwner
  • Report abuse
Report abuse

check email feature

  • Overview 8
  • Commits 2
  • Changes 6

Created by: 2rba

When user is trying to do the "PUSH" operation, the Gitlab server perform the check of user's e-mail address within the existing Gitlab user database. If user's e-mail does not exist, then Gitlab does not allow to "PUSH" and display the corresponding message "User is not allowed to PUSH due to invalid e-mail address, please, use your registered e-mail address". To make error message displayed corresponding pull request to the repository gitlab-shell has been created

Loading
Loading

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: TeatroIO

    I've prepared a stage. Click to open.

    By Administrator on 2014-11-04T10:33:02 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 23cc5088 10 years ago
    app/controllers/projects_controller.rb
    205 205 params.require(:project).permit(
    206 206 :name, :path, :description, :issues_tracker, :tag_list,
    207 207 :issues_enabled, :merge_requests_enabled, :snippets_enabled, :issues_tracker_id, :default_branch,
    208 :wiki_enabled, :visibility_level, :import_url, :last_activity_at, :namespace_id
    208 :wiki_enabled, :visibility_level, :import_url, :last_activity_at, :namespace_id, :check_email
    • Administrator
      Administrator @root · 10 years ago
      Owner

      Created by: houndci-bot

      Line is too long. [99/80]

      By Administrator on 2015-01-05T21:44:28 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 23cc5088 10 years ago
    lib/gitlab/git_access.rb
    67 if oldrev && newrev
    68 emails = IO.popen(%W(git --git-dir=#{project.repository.path_to_repo} log --format=%ae #{oldrev}...#{newrev})).read.split(/\s/).uniq
    69 if emails.present?
    70 found_emails = User.where(email: emails).map{|u| u.email}
    71 missing = emails - found_emails
    72 @errors << "User is not allowed to PUSH due to invalid e-mail address (#{missing.join(' ')}), please, use your registered e-mail address" if missing.present?
    73 return missing
    74 end
    75 end
    76 []
    77 end
    78
    62 79 def change_allowed?(user, project, change)
    63 80 oldrev, newrev, ref = change.split(' ')
    64 81
    82 return false if project.check_email && invalid_emails(project,oldrev,newrev).present?
    • Administrator
      Administrator @root · 10 years ago
      Owner

      Created by: houndci-bot

      Line is too long. [91/80]
      Space missing after comma.

      By Administrator on 2015-01-05T21:44:28 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 23cc5088 10 years ago
    lib/gitlab/git_access.rb
    59 63 true
    60 64 end
    61 65
    66 def invalid_emails(project, oldrev, newrev)
    67 if oldrev && newrev
    68 emails = IO.popen(%W(git --git-dir=#{project.repository.path_to_repo} log --format=%ae #{oldrev}...#{newrev})).read.split(/\s/).uniq
    69 if emails.present?
    70 found_emails = User.where(email: emails).map{|u| u.email}
    • Administrator
      Administrator @root · 10 years ago
      Owner

      Created by: houndci-bot

      Use 2 (not 4) spaces for indentation.
      Space missing to the left of {.
      Space between { and | missing.
      Space missing inside }.

      By Administrator on 2015-01-05T21:44:28 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 23cc5088 10 years ago
    lib/gitlab/git_access.rb
    59 63 true
    60 64 end
    61 65
    66 def invalid_emails(project, oldrev, newrev)
    67 if oldrev && newrev
    68 emails = IO.popen(%W(git --git-dir=#{project.repository.path_to_repo} log --format=%ae #{oldrev}...#{newrev})).read.split(/\s/).uniq
    • Administrator
      Administrator @root · 10 years ago
      Owner

      Created by: houndci-bot

      Line is too long. [140/80]

      By Administrator on 2015-01-05T21:44:28 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 23cc5088 10 years ago
    lib/gitlab/git_access.rb
    59 63 true
    60 64 end
    61 65
    66 def invalid_emails(project, oldrev, newrev)
    67 if oldrev && newrev
    68 emails = IO.popen(%W(git --git-dir=#{project.repository.path_to_repo} log --format=%ae #{oldrev}...#{newrev})).read.split(/\s/).uniq
    69 if emails.present?
    70 found_emails = User.where(email: emails).map{|u| u.email}
    71 missing = emails - found_emails
    72 @errors << "User is not allowed to PUSH due to invalid e-mail address (#{missing.join(' ')}), please, use your registered e-mail address" if missing.present?
    • Administrator
      Administrator @root · 10 years ago
      Owner

      Created by: houndci-bot

      Line is too long. [169/80]

      By Administrator on 2015-01-05T21:44:28 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: jvanbaarsen

    Is there a request on the feature request forum that is similar to this? If so, can you make a comment with a link to it? Please be aware that new functionality that is not marked accepting merge/pull requests on the forum might not make it into GitLab. You might be asked to make changes and even after implementing them your feature might still be declined. If you want to reduce the chance of this happening please have a discussion in the forum first.

    By Administrator on 2014-12-13T20:22:32 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: jvanbaarsen

    This merge request has been closed because a request for more information has not been reacted to for more than 2 weeks. If you respond and conform to the merge request guidelines in our contributing guidelines we will reopen this merge request.

    By Administrator on 2015-02-01T13:37:37 (imported from GitLab project)

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Milestone
No milestone
None
None
Time tracking
No estimate or time spent
1
Labels
Awaiting developer action/feedback
Assign labels
  • No matching results
  • Manage project labels
Lock merge request
Unlocked
1
1 participant
user avatar
Reference: gpt/large_projects/gitlabhq1!8242
Source branch: github/fork/2rba/check_email

    0 pending comments

Menu

Projects Groups Snippets
Help