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
aa3c7219
Commit
aa3c7219
authored
Jan 05, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-api-lookup-with-usernames-with-dots' of
https://gitlab.com/stanhu/gitlab-ce
parents
7f2127ee
086cfc86
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
CHANGELOG
CHANGELOG
+1
-0
lib/api/projects.rb
lib/api/projects.rb
+1
-1
spec/requests/api/projects_spec.rb
spec/requests/api/projects_spec.rb
+9
-0
No files found.
CHANGELOG
View file @
aa3c7219
...
...
@@ -17,6 +17,7 @@ v 8.4.0 (unreleased)
- Add system hook messages for project rename and transfer (Steve Norman)
- Fix version check image in Safari
- Show 'All' tab by default in the builds page
- Fix API project lookups when querying with a namespace with dots (Stan Hu)
v 8.3.3 (unreleased)
- Fix project transfer e-mail sending incorrect paths in e-mail notification (Stan Hu)
...
...
lib/api/projects.rb
View file @
aa3c7219
...
...
@@ -3,7 +3,7 @@ module API
class
Projects
<
Grape
::
API
before
{
authenticate!
}
resource
:projects
do
resource
:projects
,
requirements:
{
id:
/[^\/]+/
}
do
helpers
do
def
map_public_to_visibility_level
(
attrs
)
publik
=
attrs
.
delete
(
:public
)
...
...
spec/requests/api/projects_spec.rb
View file @
aa3c7219
...
...
@@ -382,6 +382,15 @@ describe API::API, api: true do
expect
(
response
.
status
).
to
eq
(
404
)
end
it
'should handle users with dots'
do
dot_user
=
create
(
:user
,
username:
'dot.user'
)
project
=
create
(
:project
,
creator_id:
dot_user
.
id
,
namespace:
dot_user
.
namespace
)
get
api
(
"/projects/
#{
dot_user
.
namespace
.
name
}
%2F
#{
project
.
path
}
"
,
dot_user
)
expect
(
response
.
status
).
to
eq
(
200
)
expect
(
json_response
[
'name'
]).
to
eq
(
project
.
name
)
end
describe
'permissions'
do
context
'all projects'
do
it
'Contains permission information'
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