diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 20:02:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 20:02:30 +0000 |
commit | 41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch) | |
tree | 9c8d89a8624828992f06d892cd2f43818ff5dcc8 /lib/api/entities/user_safe.rb | |
parent | 0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff) | |
download | gitlab-ce-14.9.0-rc42.tar.gz |
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'lib/api/entities/user_safe.rb')
-rw-r--r-- | lib/api/entities/user_safe.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/api/entities/user_safe.rb b/lib/api/entities/user_safe.rb index c7349026a88..fb99c2e960d 100644 --- a/lib/api/entities/user_safe.rb +++ b/lib/api/entities/user_safe.rb @@ -5,14 +5,7 @@ module API class UserSafe < Grape::Entity expose :id, :username expose :name do |user| - next user.name unless user.project_bot? - - next user.name if options[:current_user]&.can?(:read_project, user.projects.first) - - # If the requester does not have permission to read the project bot name, - # the API returns an arbitrary string. UI changes will be addressed in a follow up issue: - # https://gitlab.com/gitlab-org/gitlab/-/issues/346058 - '****' + user.redacted_name(options[:current_user]) end end end |