diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-08-27 21:55:00 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-08-27 21:55:00 +0000 |
commit | 53698401fb15d7e69514bb48217711d060fd9e46 (patch) | |
tree | 7c2592388e7bfe113cfdf07d3abce2806ffccb51 | |
parent | 04d5d2655288eb7abebb844ad75713340578cfdb (diff) | |
parent | ff30b407545b2b873ffbe9d5d3d603e550013cf3 (diff) | |
download | gitlab-ce-53698401fb15d7e69514bb48217711d060fd9e46.tar.gz |
Merge branch 'make_all_profile_public' into 'master'
Make all profile public
https://dev.gitlab.org/gitlab/gitlabhq/issues/1361
See merge request !1219
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/controllers/users_controller.rb | 4 | ||||
-rw-r--r-- | app/models/user.rb | 4 | ||||
-rw-r--r-- | app/views/profiles/show.html.haml | 5 | ||||
-rw-r--r-- | features/user.feature | 5 |
5 files changed, 1 insertions, 18 deletions
diff --git a/CHANGELOG b/CHANGELOG index 638a6aac036..b827b7c69eb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -23,6 +23,7 @@ v 8.0.0 (unreleased) - Fix 500 error when submit project snippet without body - Improve search page usability - Bring more UI consistency in way how projects, snippets and groups lists are rendered + - Make all profiles public v 7.14.1 - Improve abuse reports management from admin area diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 2bb5c338cf6..1484356a7f4 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -51,10 +51,6 @@ class UsersController < ApplicationController def set_user @user = User.find_by_username!(params[:username]) - - unless current_user || @user.public_profile? - return authenticate_user! - end end def authorized_projects_ids diff --git a/app/models/user.rb b/app/models/user.rb index f70761074c5..b4e779370a0 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -637,10 +637,6 @@ class User < ActiveRecord::Base email.start_with?('temp-email-for-oauth') end - def public_profile? - authorized_projects.public_only.any? - end - def avatar_url(size = nil) if avatar.present? [gitlab_config.url, avatar.url].join diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index 9fdeddfcc7a..c519e52e596 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -100,11 +100,6 @@ %hr = link_to 'Remove avatar', profile_avatar_path, data: { confirm: "Avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-sm remove-avatar" - - if @user.public_profile? - .alert.alert-info - %h4 Public profile - %p Your profile is publicly visible because you joined public project(s) - .row .col-md-7 diff --git a/features/user.feature b/features/user.feature index 69618e929c4..35eae842e77 100644 --- a/features/user.feature +++ b/features/user.feature @@ -14,11 +14,6 @@ Feature: User And I should not see project "Internal" And I should see project "Community" - Scenario: I visit user "John Doe" page while not signed in when he is not authorized to a public project - Given "John Doe" owns internal project "Internal" - When I visit user "John Doe" page - Then I should be redirected to sign in page - # Signed in as someone else Scenario: I visit user "John Doe" page while signed in as someone else when he owns a public project |