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!
1 file
+ 4
7
Compare changes
  • Side-by-side
  • Inline
+ 4
7
@@ -122,6+122,6 @@
optional :name, type: String, desc: 'The name of the group'
optional :path, type: String, desc: 'The path of the group'
use :optional_params
end
put ':id' do
group = find_group!(params[:id])
authorize! :admin_group, group
# EE
if params[:shared_runners_minutes_limit]
group.shared_runners_minutes_limit =
params[:shared_runners_minutes_limit].to_i
if group.shared_runners_minutes_limit_changed?
authenticated_as_admin!
end
if params[:shared_runners_minutes_limit].present? &&
group.shared_runners_minutes_limit.to_i !=
params[:shared_runners_minutes_limit].to_i
authenticated_as_admin!
end
if ::Groups::UpdateService.new(group, current_user, declared_params(include_missing: false)).execute
Loading