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
d7eefd11
Commit
d7eefd11
authored
Jun 27, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass current_user to present method to add admin exclusive fields
parent
a0f9e4d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
lib/api/namespaces.rb
lib/api/namespaces.rb
+1
-1
spec/requests/api/namespaces_spec.rb
spec/requests/api/namespaces_spec.rb
+2
-1
No files found.
lib/api/namespaces.rb
View file @
d7eefd11
...
...
@@ -17,7 +17,7 @@ module API
namespaces
=
namespaces
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
present
paginate
(
namespaces
),
with:
Entities
::
Namespace
present
paginate
(
namespaces
),
with:
Entities
::
Namespace
,
current_user:
current_user
end
desc
'Update a namespace'
do
...
...
spec/requests/api/namespaces_spec.rb
View file @
d7eefd11
...
...
@@ -20,7 +20,8 @@ describe API::Namespaces do
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
).
to
include_pagination_headers
expect
(
json_response
.
first
).
to
include
(
'id'
,
'name'
,
'path'
,
'full_path'
,
'parent_id'
,
'members_count'
)
expect
(
json_response
.
first
).
to
include
(
'id'
,
'name'
,
'path'
,
'full_path'
,
'parent_id'
,
'members_count'
,
'shared_runners_minutes_limit'
,
'plan'
)
end
it
"admin: returns an array of all namespaces"
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