Skip to content

GitLab

  • Menu
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
  • Issues
  • #1046

Closed
Open
Created Jul 06, 2012 by Administrator@rootOwner

GITLAB_OPTS not available in user model?

Created by: tobert

I'm using LDAP authentication on master and kept getting the following error message:

(ldap) Authentication failure! ldap_error: NoMethodError, undefined method `[]' for nil:NilClass

It turns out this was the actual culprit. Obviously my hack isn't ideal, but I'm up and running with this change:

diff --git a/app/models/user.rb b/app/models/user.rb index ccb1ddd..6190aa7 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -91,7 +91,7 @@ class User < ActiveRecord::Base :email => email, :password => password, :password_confirmation => password,

  •    :projects_limit => GITLAB_OPTS["default_projects_limit"]
  •    :projects_limit => 500
    ) end end

Maybe you want ::GITLAB_OPTS?

Assignee
Assign to
Time tracking