summaryrefslogtreecommitdiff
path: root/app/views/users
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-16 07:21:11 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-16 07:21:11 +0100
commit6635621faeebbc8dd744e0ad71741f9e82aed1f8 (patch)
treeaa650df3fd8d336f6b42fb857116eeb058f78765 /app/views/users
parent4efaf6c14338bd3b63b2aa4a25f1813e25fc5de7 (diff)
Show the user_groups in User#view only for Admins.
Diffstat (limited to 'app/views/users')
-rw-r--r--app/views/users/show.html.haml4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index c3af173..f74d0a5 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -43,10 +43,12 @@
%section
= render :partial => 'phone_books', :locals => {:user => @user, :phone_books => @phone_books}
- - cache(['user_show_overview', I18n.locale, @user, @user.user_groups, @user.sip_accounts, @user.phones, @user.fax_accounts, @user.conferences]) do
+ - if current_user.user_groups.where(:name => 'Admins').any?
- cache(['user_show_user_groups_overview', I18n.locale, @user, @user.user_groups]) do
= render :partial => 'user_groups', :locals => {:user => @user, :tenant => @tenant}
+ - cache(['user_show_overview_for_sip_account_phones_fax_accounts_and_conferences', I18n.locale, @user, @user.sip_accounts, @user.phones, @user.fax_accounts, @user.conferences]) do
+
- cache(['user_show_sip_accounts_overview', I18n.locale, @user, @user.sip_accounts]) do
= render :partial => 'sip_accounts', :locals => {:user => @user}