summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2016-04-13 15:37:17 -0300
committerFelipe Artur <felipefac@gmail.com>2016-04-13 15:40:29 -0300
commit39d853f5bd9492fa8dfc8e07ec11070705d3c879 (patch)
treea9d7cd934862c5f3fe1b734f03b70d4d290af07e
parent75228cdcb3c1f05f6b35b1b9201bd1fa3e517b72 (diff)
downloadgitlab-ce-39d853f5bd9492fa8dfc8e07ec11070705d3c879.tar.gz
Add changelog entry
-rw-r--r--CHANGELOG1
-rw-r--r--lib/api/users.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index a23c8a54af1..f6913f06a46 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
Please view this file on the master branch, on stable branches it's out of date.
v 8.7.0 (unreleased)
+ - Restrict user profiles when public visibility level is restricted.
- All images in discussions and wikis now link to their source files !3464 (Connor Shea).
- Improved Markdown rendering performance !3389 (Yorick Peterse)
- Don't attempt to look up an avatar in repo if repo directory does not exist (Stan Hu)
diff --git a/lib/api/users.rb b/lib/api/users.rb
index 315268fc0ca..ea6fa2dc8a8 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -40,7 +40,7 @@ module API
get ":id" do
@user = User.find(params[:id])
- if current_user.present? && current_user.is_admin?
+ if current_user && current_user.is_admin?
present @user, with: Entities::UserFull
elsif can?(current_user, :read_user, @user)
present @user, with: Entities::User