Merge branch 'master' of git://github.com/gitlabhq/gitlabhq

This commit is contained in:
Florian Unglaub 2012-08-24 15:25:52 +02:00
commit 48443d20ca
114 changed files with 1524 additions and 1674 deletions

View file

@ -0,0 +1,25 @@
class LabelsController < ApplicationController
before_filter :authenticate_user!
before_filter :project
before_filter :module_enabled
layout "project"
# Authorize
before_filter :add_project_abilities
# Allow read any issue
before_filter :authorize_read_issue!
respond_to :js, :html
def index
@labels = Issue.tag_counts_on(:labels)
end
protected
def module_enabled
return render_404 unless @project.issues_enabled
end
end

View file

@ -12,8 +12,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
def ldap
# We only find ourselves here if the authentication to LDAP was successful.
info = request.env["omniauth.auth"]["info"]
@user = User.find_for_ldap_auth(info)
@user = User.find_for_ldap_auth(request.env["omniauth.auth"], current_user)
if @user.persisted?
@user.remember_me = true
end
@ -39,7 +38,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
current_user.save
redirect_to profile_path
else
@user = User.find_by_provider_and_uid(provider, uid)
@user = User.find_by_provider_and_extern_uid(provider, uid)
if @user
sign_in_and_redirect @user

View file

@ -1,4 +1,4 @@
require File.join(Rails.root, 'lib', 'graph_commit')
require Rails.root.join('lib', 'gitlab', 'graph_commit')
class ProjectsController < ApplicationController
before_filter :project, except: [:index, :new, :create]
@ -78,7 +78,7 @@ class ProjectsController < ApplicationController
end
def graph
@days_json, @commits_json = GraphCommit.to_graph(project)
@days_json, @commits_json = Gitlab::GraphCommit.to_graph(project)
end
def destroy

View file

@ -9,6 +9,7 @@ class TeamMembersController < ApplicationController
def show
@team_member = project.users_projects.find(params[:id])
@events = @team_member.user.recent_events.where(:project_id => @project.id).limit(7)
end
def new