diff options
author | JX Terry <jxterry@protonmail.com> | 2018-07-24 12:46:19 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-07-24 12:46:19 +0000 |
commit | 99011a61cf4136c806e7de43fcd55475d2407fa1 (patch) | |
tree | 99486b31dc0df1b86db0bb11ec32b05c9bc1fb2d /app/helpers/users_helper.rb | |
parent | adc327d3fa72b9f5b9c42c629c99f0a89ca15192 (diff) | |
download | gitlab-ce-99011a61cf4136c806e7de43fcd55475d2407fa1.tar.gz |
Add an option to have a private profile on GitLab
Diffstat (limited to 'app/helpers/users_helper.rb')
-rw-r--r-- | app/helpers/users_helper.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 4d17b22a4a1..8ee4203b6f5 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -42,7 +42,13 @@ module UsersHelper private def get_profile_tabs - [:activity, :groups, :contributed, :projects, :snippets] + tabs = [] + + if can?(current_user, :read_user_profile, @user) + tabs += [:activity, :groups, :contributed, :projects, :snippets] + end + + tabs end def get_current_user_menu_items |