summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorCiro Santillli <ciro.santilli@gmail.com>2014-01-27 15:53:59 +0100
committerCiro Santillli <ciro.santilli@gmail.com>2014-02-11 15:45:30 +0100
commit91571c078dee6297a17afecb6dc071ce882c82be (patch)
treed57688b9653182beaa345e6cabe11b50e4dfabee /app/views
parent1284f21c073e42c44b9faa7b0ad1ec90b66ca8fb (diff)
downloadgitlab-ce-91571c078dee6297a17afecb6dc071ce882c82be.tar.gz
User pages are visible to users without login
... if the user is authorized to at least one public project.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/help/public_access.html.haml15
-rw-r--r--app/views/layouts/_head_panel.html.haml2
-rw-r--r--app/views/layouts/_public_head_panel.html.haml6
-rw-r--r--app/views/layouts/public.html.haml3
-rw-r--r--app/views/layouts/public_projects.html.haml4
-rw-r--r--app/views/layouts/public_users.html.haml7
6 files changed, 27 insertions, 10 deletions
diff --git a/app/views/help/public_access.html.haml b/app/views/help/public_access.html.haml
index ba2df8c3553..e1b2a2ce1fa 100644
--- a/app/views/help/public_access.html.haml
+++ b/app/views/help/public_access.html.haml
@@ -44,3 +44,18 @@
%li Go to your project dashboard
%li Click on the "Edit" tab
%li Change "Visibility Level"
+
+ %h4 Visibility of users
+ The public page of users, located at
+ = succeed "," do
+ %code u/username
+ is visible if either:
+ %ul
+ %li
+ You are logged in.
+ %li
+ %p
+ You are logged out, and the target user is authorized to (is Guest, Reporter, etc.)
+ at least one public project.
+ %p Otherwise, you will be redirected to the sign in page.
+ When visiting the public page of an user, you will only see listed projects which you can view yourself.
diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml
index 1d181d3519c..5080a1b7ef6 100644
--- a/app/views/layouts/_head_panel.html.haml
+++ b/app/views/layouts/_head_panel.html.haml
@@ -6,7 +6,7 @@
= link_to root_path, class: "home has_bottom_tooltip", title: "Dashboard" do
%h1 GITLAB
%span.separator
- %h1.project_name= title
+ %h1.title= title
%button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"}
%span.sr-only Toggle navigation
diff --git a/app/views/layouts/_public_head_panel.html.haml b/app/views/layouts/_public_head_panel.html.haml
index 65c806a915f..99e11cd2b5c 100644
--- a/app/views/layouts/_public_head_panel.html.haml
+++ b/app/views/layouts/_public_head_panel.html.haml
@@ -6,11 +6,7 @@
= link_to public_root_path, class: "home" do
%h1 GITLAB
%span.separator
- %h1.project_name
- - if @project
- = project_title(@project)
- - else
- Public Projects
+ %h1.title= title
.pull-right
= link_to "Sign in", new_session_path(:user), class: 'btn btn-sign-in btn-new'
diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml
index 8f490f61a9c..fda81b3cc83 100644
--- a/app/views/layouts/public.html.haml
+++ b/app/views/layouts/public.html.haml
@@ -5,7 +5,6 @@
- if current_user
= render "layouts/head_panel", title: "Public Projects"
- else
- = render "layouts/public_head_panel"
-
+ = render "layouts/public_head_panel", title: "Public Projects"
.container.navless-container
.content= yield
diff --git a/app/views/layouts/public_projects.html.haml b/app/views/layouts/public_projects.html.haml
index a8e3236d865..7de2347803a 100644
--- a/app/views/layouts/public_projects.html.haml
+++ b/app/views/layouts/public_projects.html.haml
@@ -2,8 +2,8 @@
%html{ lang: "en"}
= render "layouts/head", title: @project.name_with_namespace
%body{class: "#{app_theme} application", :'data-page' => body_data_page}
- = render "layouts/public_head_panel"
- %nav.main-nav.navbar-collapse.collapse
+ = render "layouts/public_head_panel", title: @project.name_with_namespace
+ %nav.main-nav
.container= render 'layouts/nav/project'
.container
.content= yield
diff --git a/app/views/layouts/public_users.html.haml b/app/views/layouts/public_users.html.haml
new file mode 100644
index 00000000000..80709d650da
--- /dev/null
+++ b/app/views/layouts/public_users.html.haml
@@ -0,0 +1,7 @@
+!!! 5
+%html{ lang: "en"}
+ = render "layouts/head", title: @title
+ %body{class: "#{app_theme} application", :'data-page' => body_data_page}
+ = render "layouts/public_head_panel", title: @title
+ .container.navless-container
+ .content= yield