diff --git a/app/views/layouts/application-ng.rhtml b/app/views/layouts/application-ng.rhtml
index 0601e95..6a1af92 100644
--- a/app/views/layouts/application-ng.rhtml
+++ b/app/views/layouts/application-ng.rhtml
@@ -55,8 +55,12 @@
<% if logged_in? %>
<%= _('Welcome, %s.') % link_to('' + user.identifier + '', user.url, :id => "homepage-link", :title => _('Go to your homepage')) %>
- <%= link_to('' + _('Administration') + '', { :controller => 'admin_panel', :action => 'index' }, :id => "controlpanel", :title => _("Configure the environment")) %>
- <%= link_to('' + _('Control panel') + '', user.admin_url, :id => "controlpanel", :title => _("Configure your personal account and content")) %>
+ <% if user.is_admin?(environment) %>
+ <%= link_to('' + _('Administration') + '', { :controller => 'admin_panel', :action => 'index' }, :id => "controlpanel", :title => _("Configure the environment")) %>
+ <% end %>
+ <% if (user.environment == environment) %>
+ <%= link_to('' + _('Control panel') + '', user.admin_url, :id => "controlpanel", :title => _("Configure your personal account and content")) if (user.environment == environment) %>
+ <% end %>
<%= link_to('' + _('Logout') + '', { :controller => 'account', :action => 'logout'} , :id => "logout", :title => _("Leave the system")) %>
<% else %>
<%= _('%s or %s') % [thickbox_inline_popup_link('' + _('Login') + '', 'inlineLoginBox', :id => 'link_login', :help => _('Click here to enter your username and password and be recognized by the system.')), link_to('' + _('Register') + '', :controller => 'account', :action => 'signup') ] %>
--
libgit2 0.21.2