Skip to content
Snippets Groups Projects

Add shared_runners_minutes_limit to groups and users API

Merged username-removed-423915 requested to merge add-api-shared_runners_minutes_limit into master
All threads resolved!
2 files
+ 12
1
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 4
1
@@ -122,6+122,6 @@
@@ -122,6+122,6 @@
optional :name, type: String, desc: 'The name of the group'
optional :name, type: String, desc: 'The name of the group'
optional :path, type: String, desc: 'The path of the group'
optional :path, type: String, desc: 'The path of the group'
use :optional_params
use :optional_params
end
end
put ':id' do
put ':id' do
group = find_group!(params[:id])
group = find_group!(params[:id])
authorize! :admin_group, group
authorize! :admin_group, group
# EE
# EE
authenticated_as_admin! if params[:shared_runners_minutes_limit]
if params[:shared_runners_minutes_limit].to_i !=
 
group.shared_runners_minutes_limit.to_i
 
authenticated_as_admin!
 
end
if ::Groups::UpdateService.new(group, current_user, declared_params(include_missing: false)).execute
if ::Groups::UpdateService.new(group, current_user, declared_params(include_missing: false)).execute
present group, with: Entities::GroupDetail, current_user: current_user
present group, with: Entities::GroupDetail, current_user: current_user
Loading