Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
61e8ca8c
Commit
61e8ca8c
authored
Mar 24, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't leak private group existence by redirecting from namespace controller to group controller.
parent
2953e0d1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
7 deletions
+16
-7
CHANGELOG
CHANGELOG
+1
-0
app/controllers/namespaces_controller.rb
app/controllers/namespaces_controller.rb
+13
-5
app/models/concerns/mentionable.rb
app/models/concerns/mentionable.rb
+1
-1
lib/gitlab/markdown.rb
lib/gitlab/markdown.rb
+1
-1
No files found.
CHANGELOG
View file @
61e8ca8c
...
...
@@ -31,6 +31,7 @@ v 7.10.0 (unreleased)
- Replace commits calendar with faster contribution calendar that includes issues and merge requests
- Add inifinite scroll to user page activity
- Don't show commit comment button when user is not signed in.
- Don't leak private group existence by redirecting from namespace controller to group controller.
v 7.9.0
- Send EmailsOnPush email when branch or tag is created or deleted.
...
...
app/controllers/namespaces_controller.rb
View file @
61e8ca8c
...
...
@@ -4,14 +4,22 @@ class NamespacesController < ApplicationController
def
show
namespace
=
Namespace
.
find_by
(
path:
params
[
:id
])
unless
namespace
return
render_404
if
namespace
if
namespace
.
is_a?
(
Group
)
group
=
namespace
else
user
=
namespace
.
owner
end
end
if
namespace
.
type
==
"Group"
redirect_to
group_path
(
namespace
)
if
user
redirect_to
user_path
(
user
)
elsif
group
&&
can?
(
current_user
,
:read_group
,
group
)
redirect_to
group_path
(
group
)
elsif
current_user
.
nil?
authenticate_user!
else
re
direct_to
user_path
(
namespace
.
owner
)
re
nder_404
end
end
end
app/models/concerns/mentionable.rb
View file @
61e8ca8c
...
...
@@ -52,7 +52,7 @@ module Mentionable
if
identifier
==
"all"
users
.
push
(
*
project
.
team
.
members
.
flatten
)
elsif
namespace
=
Namespace
.
find_by
(
path:
identifier
)
if
namespace
.
type
==
"Group"
if
namespace
.
is_a?
(
Group
)
users
.
push
(
*
namespace
.
users
)
else
users
<<
namespace
.
owner
...
...
lib/gitlab/markdown.rb
View file @
61e8ca8c
...
...
@@ -221,7 +221,7 @@ module Gitlab
link_to
(
"@all"
,
namespace_project_url
(
project
.
namespace
,
project
),
options
)
elsif
namespace
=
Namespace
.
find_by
(
path:
identifier
)
url
=
if
namespace
.
type
==
"Group"
if
namespace
.
is_a?
(
Group
)
group_url
(
identifier
)
else
user_url
(
identifier
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment