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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
526b21c4
Commit
526b21c4
authored
Oct 24, 2014
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
internal snippets: fix exposing of title
Conflicts: CHANGELOG VERSION
parent
6adf3bbd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
1 deletion
+14
-1
CHANGELOG
CHANGELOG
+4
-0
VERSION
VERSION
+1
-1
app/finders/snippets_finder.rb
app/finders/snippets_finder.rb
+2
-0
spec/finders/snippets_finder_spec.rb
spec/finders/snippets_finder_spec.rb
+7
-0
No files found.
CHANGELOG
View file @
526b21c4
v 7.4.2
- Fix internal snippet exposing for unauthenticated users
v 7.4.1
- Fix LDAP authentication for Git HTTP access
- Fix LDAP config lookup for provider 'ldap'
- Fix public snippets
- Fix 500 error on projects with nested submodules
v 7.4.0
- Refactored membership logic
...
...
VERSION
View file @
526b21c4
7.4.
1
-ee
7.4.
2
-ee
app/finders/snippets_finder.rb
View file @
526b21c4
...
...
@@ -29,6 +29,8 @@ class SnippetsFinder
def
by_user
(
current_user
,
user
,
scope
)
snippets
=
user
.
snippets
.
fresh
.
non_expired
return
snippets
.
are_public
unless
current_user
if
user
==
current_user
case
scope
when
'are_internal'
then
...
...
spec/finders/snippets_finder_spec.rb
View file @
526b21c4
...
...
@@ -64,6 +64,13 @@ describe SnippetsFinder do
snippets
=
SnippetsFinder
.
new
.
execute
(
user
,
filter: :by_user
,
user:
user
)
snippets
.
should
include
(
@snippet1
,
@snippet2
,
@snippet3
)
end
it
"returns only public snippets if unauthenticated user"
do
snippets
=
SnippetsFinder
.
new
.
execute
(
nil
,
filter: :by_user
,
user:
user
)
snippets
.
should
include
(
@snippet3
)
snippets
.
should_not
include
(
@snippet2
,
@snippet1
)
end
end
context
'by_project filter'
do
...
...
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