Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJX Terry <jxterry@protonmail.com>2018-07-24 15:46:19 +0300
committerDouwe Maan <douwe@gitlab.com>2018-07-24 15:46:19 +0300
commit99011a61cf4136c806e7de43fcd55475d2407fa1 (patch)
tree99486b31dc0df1b86db0bb11ec32b05c9bc1fb2d /app/helpers/users_helper.rb
parentadc327d3fa72b9f5b9c42c629c99f0a89ca15192 (diff)
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.rb8
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