debian-mirror-gitlab/app/controllers/groups/usage_quotas_controller.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
853 B
Ruby
Raw Normal View History

2023-03-04 22:38:38 +05:30
# frozen_string_literal: true
module Groups
class UsageQuotasController < Groups::ApplicationController
before_action :authorize_read_usage_quotas!
before_action :verify_usage_quotas_enabled!
2023-04-23 21:23:45 +05:30
before_action :push_frontend_feature_flags
2023-03-04 22:38:38 +05:30
2023-06-20 00:43:36 +05:30
feature_category :consumables_cost_management
2023-03-04 22:38:38 +05:30
urgency :low
def index
# To be used in ee/app/controllers/ee/groups/usage_quotas_controller.rb
@seat_count_data = seat_count_data
end
private
2023-04-23 21:23:45 +05:30
def push_frontend_feature_flags
push_frontend_feature_flag(:usage_quotas_for_all_editions, @group)
end
2023-03-04 22:38:38 +05:30
def verify_usage_quotas_enabled!
2023-03-17 16:20:25 +05:30
render_404 unless group.usage_quotas_enabled?
2023-03-04 22:38:38 +05:30
end
# To be overriden in ee/app/controllers/ee/groups/usage_quotas_controller.rb
def seat_count_data; end
end
end
Groups::UsageQuotasController.prepend_mod