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
d6e64fd9
Commit
d6e64fd9
authored
Dec 20, 2019
by
Alper Akgun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose trial_ends_on on Namespaces API
parent
80dd64cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
ee/changelogs/unreleased/119158-add-trial_ends_on-to-namespaces-api-v4-api.yml
...sed/119158-add-trial_ends_on-to-namespaces-api-v4-api.yml
+5
-0
ee/lib/ee/api/entities.rb
ee/lib/ee/api/entities.rb
+3
-0
ee/spec/requests/api/namespaces_spec.rb
ee/spec/requests/api/namespaces_spec.rb
+3
-3
No files found.
ee/changelogs/unreleased/119158-add-trial_ends_on-to-namespaces-api-v4-api.yml
0 → 100644
View file @
d6e64fd9
---
title
:
Add trial_ends_on to Namespaces API
merge_request
:
22121
author
:
type
:
added
ee/lib/ee/api/entities.rb
View file @
d6e64fd9
...
@@ -156,6 +156,9 @@ module EE
...
@@ -156,6 +156,9 @@ module EE
expose
:plan
,
if:
->
(
namespace
,
opts
)
{
::
Ability
.
allowed?
(
opts
[
:current_user
],
:admin_namespace
,
namespace
)
}
do
|
namespace
,
_
|
expose
:plan
,
if:
->
(
namespace
,
opts
)
{
::
Ability
.
allowed?
(
opts
[
:current_user
],
:admin_namespace
,
namespace
)
}
do
|
namespace
,
_
|
namespace
.
actual_plan_name
namespace
.
actual_plan_name
end
end
expose
:trial_ends_on
,
if:
->
(
namespace
,
opts
)
{
::
Ability
.
allowed?
(
opts
[
:current_user
],
:admin_namespace
,
namespace
)
}
do
|
namespace
,
_
|
namespace
.
trial_ends_on
end
end
end
end
end
...
...
ee/spec/requests/api/namespaces_spec.rb
View file @
d6e64fd9
...
@@ -22,12 +22,12 @@ describe API::Namespaces do
...
@@ -22,12 +22,12 @@ describe API::Namespaces do
expect
(
group_kind_json_response
.
keys
).
to
contain_exactly
(
'id'
,
'kind'
,
'name'
,
'path'
,
'full_path'
,
expect
(
group_kind_json_response
.
keys
).
to
contain_exactly
(
'id'
,
'kind'
,
'name'
,
'path'
,
'full_path'
,
'parent_id'
,
'members_count_with_descendants'
,
'parent_id'
,
'members_count_with_descendants'
,
'plan'
,
'shared_runners_minutes_limit'
,
'plan'
,
'shared_runners_minutes_limit'
,
'avatar_url'
,
'web_url'
,
'avatar_url'
,
'web_url'
,
'trial_ends_on'
,
'extra_shared_runners_minutes_limit'
,
'billable_members_count'
)
'extra_shared_runners_minutes_limit'
,
'billable_members_count'
)
expect
(
user_kind_json_response
.
keys
).
to
contain_exactly
(
'id'
,
'kind'
,
'name'
,
'path'
,
'full_path'
,
expect
(
user_kind_json_response
.
keys
).
to
contain_exactly
(
'id'
,
'kind'
,
'name'
,
'path'
,
'full_path'
,
'parent_id'
,
'plan'
,
'shared_runners_minutes_limit'
,
'parent_id'
,
'plan'
,
'shared_runners_minutes_limit'
,
'avatar_url'
,
'web_url'
,
'avatar_url'
,
'web_url'
,
'trial_ends_on'
,
'extra_shared_runners_minutes_limit'
,
'billable_members_count'
)
'extra_shared_runners_minutes_limit'
,
'billable_members_count'
)
end
end
end
end
...
@@ -40,7 +40,7 @@ describe API::Namespaces do
...
@@ -40,7 +40,7 @@ describe API::Namespaces do
owned_group_response
=
json_response
.
find
{
|
resource
|
resource
[
'id'
]
==
group1
.
id
}
owned_group_response
=
json_response
.
find
{
|
resource
|
resource
[
'id'
]
==
group1
.
id
}
expect
(
owned_group_response
.
keys
).
to
contain_exactly
(
'id'
,
'kind'
,
'name'
,
'path'
,
'full_path'
,
expect
(
owned_group_response
.
keys
).
to
contain_exactly
(
'id'
,
'kind'
,
'name'
,
'path'
,
'full_path'
,
'trial_ends_on'
,
'plan'
,
'parent_id'
,
'members_count_with_descendants'
,
'plan'
,
'parent_id'
,
'members_count_with_descendants'
,
'avatar_url'
,
'web_url'
,
'billable_members_count'
)
'avatar_url'
,
'web_url'
,
'billable_members_count'
)
end
end
...
...
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