summaryrefslogtreecommitdiff
path: root/app/views/layouts
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-09-09 17:36:01 +0300
committerValery Sizov <vsv2711@gmail.com>2015-09-09 17:36:01 +0300
commit44261a5d9fd5b78f8a44fe330e2386525f4c3437 (patch)
tree95679471c902db7430bee6d74a7ae61cf6999b4f /app/views/layouts
parent81f9ee48b161496cfd7c033e10dcecc52c9b50be (diff)
downloadgitlab-ce-44261a5d9fd5b78f8a44fe330e2386525f4c3437.tar.gz
integration with gitlab auth
Diffstat (limited to 'app/views/layouts')
-rw-r--r--app/views/layouts/ci/_info.html.haml2
-rw-r--r--app/views/layouts/ci/_nav.html.haml6
-rw-r--r--app/views/layouts/ci/project.html.haml2
3 files changed, 5 insertions, 5 deletions
diff --git a/app/views/layouts/ci/_info.html.haml b/app/views/layouts/ci/_info.html.haml
index bce3ce77031..9bc23cfad05 100644
--- a/app/views/layouts/ci/_info.html.haml
+++ b/app/views/layouts/ci/_info.html.haml
@@ -5,5 +5,5 @@
- if notice
.alert.alert-info= notice
- - if current_user && current_user.is_admin && Ci::Runner.count.zero?
+ - if current_user && current_user.is_admin? && Ci::Runner.count.zero?
= render 'ci/shared/no_runners'
diff --git a/app/views/layouts/ci/_nav.html.haml b/app/views/layouts/ci/_nav.html.haml
index babd14ca2d3..4a0e45a0217 100644
--- a/app/views/layouts/ci/_nav.html.haml
+++ b/app/views/layouts/ci/_nav.html.haml
@@ -9,7 +9,7 @@
.collapse.navbar-collapse
%ul.nav.navbar-nav
- - if current_user && current_user.is_admin
+ - if current_user && current_user.is_admin?
%li
= link_to ci_admin_projects_path do
Admin
@@ -19,12 +19,12 @@
%ul.nav.navbar-nav.pull-right
- if current_user
%li
- = link_to ci_user_sessions_path do
+ = link_to new_user_session_path do
.profile-holder
= image_tag user_avatar_url(current_user, 64), class: 'avatar s32', alt: ''
%span= current_user.name
%li
- = link_to ci_user_sessions_path, class: "logout", method: :delete do
+ = link_to destroy_user_session_path, class: "logout", method: :delete do
%i.fa.fa-signout
Logout
- else
diff --git a/app/views/layouts/ci/project.html.haml b/app/views/layouts/ci/project.html.haml
index 763a7fc0b02..9549485d095 100644
--- a/app/views/layouts/ci/project.html.haml
+++ b/app/views/layouts/ci/project.html.haml
@@ -16,7 +16,7 @@
= link_to 'View on GitLab', @project.gitlab_url, no_turbolink.merge( class: 'btn btn-sm' )
%hr
.container
- - if current_user && current_user.can_manage_project?(@project.gitlab_id)
+ - if current_user && can?(current_user, :manage_project, gl_project)
.row
.col-md-2.append-bottom-20
= render 'layouts/ci/nav_project'