From 6b7733749514a3bced06ea7085461eae8b938b36 Mon Sep 17 00:00:00 2001 From: Gabor Liptak Date: Tue, 18 Sep 2012 14:23:24 -0500 Subject: [PATCH 1/2] Link directly to dashboard_path (instead of root_path) --- app/controllers/projects_controller.rb | 2 +- app/helpers/application_helper.rb | 2 +- app/views/layouts/_app_menu.html.haml | 2 +- app/views/layouts/_head_panel.html.haml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 170b8892936..ad40f81c926 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -89,7 +89,7 @@ class ProjectsController < ApplicationController UsersProject.set_callback(:destroy, :after, :update_repository) respond_to do |format| - format.html { redirect_to root_path } + format.html { redirect_to dashboard_path } end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0938dc2322a..1bd9a0802f8 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -50,7 +50,7 @@ module ApplicationHelper default_nav = [ { label: "Profile", url: profile_path }, { label: "Keys", url: keys_path }, - { label: "Dashboard", url: root_path }, + { label: "Dashboard", url: dashboard_path }, { label: "Admin", url: admin_root_path } ] diff --git a/app/views/layouts/_app_menu.html.haml b/app/views/layouts/_app_menu.html.haml index 025314891f8..7d306c11849 100644 --- a/app/views/layouts/_app_menu.html.haml +++ b/app/views/layouts/_app_menu.html.haml @@ -1,6 +1,6 @@ %ul.main_menu %li.home{class: tab_class(:root)} - = link_to "Home", root_path, title: "Home" + = link_to "Home", dashboard_path, title: "Home" %li{class: tab_class(:dash_issues)} = link_to dashboard_issues_path do diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml index f5e423a5abf..edbdb89bc0a 100644 --- a/app/views/layouts/_head_panel.html.haml +++ b/app/views/layouts/_head_panel.html.haml @@ -3,7 +3,7 @@ .container .top_panel_content %div.app_logo - = link_to root_path, class: "home", title: "Home" do + = link_to dashboard_path, class: "home", title: "Home" do %h1 GITLAB %span.separator -- GitLab From ca64371c511814515da3cef00b33fa0ea1acaf8c Mon Sep 17 00:00:00 2001 From: Gabor Liptak Date: Wed, 19 Sep 2012 10:30:01 -0500 Subject: [PATCH 2/2] Don't email omniauth created users --- app/observers/user_observer.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/observers/user_observer.rb b/app/observers/user_observer.rb index 654621f7e1c..aed320f6c09 100644 --- a/app/observers/user_observer.rb +++ b/app/observers/user_observer.rb @@ -1,8 +1,9 @@ class UserObserver < ActiveRecord::Observer def after_create(user) log_info("User \"#{user.name}\" (#{user.email}) was created") - - Notify.new_user_email(user.id, user.password).deliver + unless user.extern_uid? + Notify.new_user_email(user.id, user.password).deliver + end end def after_destroy user -- GitLab