Commit ff30b407 authored by Valery Sizov's avatar Valery Sizov

Make all profile public

parent de3b7d9c
...@@ -19,6 +19,7 @@ v 8.0.0 (unreleased) ...@@ -19,6 +19,7 @@ v 8.0.0 (unreleased)
- Move dashboard activity to separate page - Move dashboard activity to separate page
- Improve performance of git blame - Improve performance of git blame
- Limit content width to 1200px for most of pages to improve readability on big screens - Limit content width to 1200px for most of pages to improve readability on big screens
- Make all profiles public
v 7.14.1 v 7.14.1
- Improve abuse reports management from admin area - Improve abuse reports management from admin area
......
...@@ -51,10 +51,6 @@ class UsersController < ApplicationController ...@@ -51,10 +51,6 @@ class UsersController < ApplicationController
def set_user def set_user
@user = User.find_by_username!(params[:username]) @user = User.find_by_username!(params[:username])
unless current_user || @user.public_profile?
return authenticate_user!
end
end end
def authorized_projects_ids def authorized_projects_ids
......
...@@ -637,10 +637,6 @@ class User < ActiveRecord::Base ...@@ -637,10 +637,6 @@ class User < ActiveRecord::Base
email.start_with?('temp-email-for-oauth') email.start_with?('temp-email-for-oauth')
end end
def public_profile?
authorized_projects.public_only.any?
end
def avatar_url(size = nil) def avatar_url(size = nil)
if avatar.present? if avatar.present?
[gitlab_config.url, avatar.url].join [gitlab_config.url, avatar.url].join
......
...@@ -100,11 +100,6 @@ ...@@ -100,11 +100,6 @@
%hr %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" = 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 .row
.col-md-7 .col-md-7
......
...@@ -14,11 +14,6 @@ Feature: User ...@@ -14,11 +14,6 @@ Feature: User
And I should not see project "Internal" And I should not see project "Internal"
And I should see project "Community" 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 # Signed in as someone else
Scenario: I visit user "John Doe" page while signed in as someone else when he owns a public project Scenario: I visit user "John Doe" page while signed in as someone else when he owns a public project
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment