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
  • #246

Closed
Open
Created Dec 28, 2011 by Administrator@rootOwner

Error 500 when I try to edit a project as a non-admin

Created by: flixflax

I created a user that is no admin. Then I logged in as this user and created a new project. After this I tried to edit it by clicking on 'Admin' in the left vertical menu -> Error 500

The log shows the following lines:

Started GET "/test3/edit" for xxxxxx at 2011-12-28 11:56:03 +0100
  Processing by ProjectsController#edit as HTML
  Parameters: {"id"=>"test3"}
Rendered projects/_form.html.haml (9.2ms)
Rendered projects/edit.html.erb within layouts/project (9.9ms)
Completed 500 Internal Server Error in 24ms

ActionView::Template::Error (/home/git/repositories/test3.git):
    29:           %cite.right= "http://#{GIT_HOST["host"]}/"
    30:         %td= f.text_field :code, :placeholder => "example"
    31: 
    32:       - unless @project.new_record? || @project.heads.empty?  
    33:         %tr
    34:           %td= f.label :default_branch, "Default Branch"
    35:           %td= f.select(:default_branch, @project.heads.map(&:name), {}, :style => "width:300px;")
  app/models/repository.rb:51:in `new'
  app/models/repository.rb:51:in `repo'
  app/models/repository.rb:85:in `heads'
  app/models/project.rb:73:in `heads'
  app/views/projects/_form.html.haml:32:in `block in _app_views_projects__form_html_haml___414915111_95768370'
  app/views/projects/_form.html.haml:1:in `_app_views_projects__form_html_haml___414915111_95768370'
  app/views/projects/edit.html.erb:1:in `_app_views_projects_edit_html_erb___313398202_95898980'
Assignee
Assign to
Time tracking