From a1385d11ac2f89ed80f46c3e0afc9fb08caf2f88 Mon Sep 17 00:00:00 2001
From: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Date: Tue, 28 Feb 2012 23:08:11 +0200
Subject: [PATCH] hide admin link for users

---
 app/views/layouts/_head_panel.html.haml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml
index e0cc4ab7c0..86ad2bd0cf 100644
--- a/app/views/layouts/_head_panel.html.haml
+++ b/app/views/layouts/_head_panel.html.haml
@@ -8,8 +8,9 @@
           %h1 
             GITLAB
 
-        = link_to admin_projects_path, :class => "admin_link", :title => "Admin area" do 
-          = image_tag "admin.PNG", :width => 16
+        - if current_user.is_admin?
+          = link_to admin_projects_path, :class => "admin_link", :title => "Admin area" do 
+            = image_tag "admin.PNG", :width => 16
 
       %h1.project_name= title
       .search= text_field_tag "search", nil, :placeholder => "Search", :class => "search-input"
-- 
2.30.9