Commit 295a8c5d authored by serenafang's avatar serenafang

Revert "Revert "Only render member events if ee and group""

This reverts commit cf1be034.
parent cf1be034
......@@ -48,12 +48,8 @@
%strong= s_('Webhooks|Confidential Issues events')
%p.text-muted.gl-ml-1
= s_('Webhooks|This URL will be triggered when a confidential issue is created/updated/merged')
%li
= form.check_box :member_events, class: 'form-check-input'
= form.label :member_events, class: 'list-label form-check-label gl-ml-1' do
%strong= s_('Webhooks|Member events')
%p.text-muted.gl-ml-1
= s_('Webhooks|This URL will be triggered when a member is added to a group')
- if @group
= render_if_exists 'groups/hooks/member_events', form: form
%li
= form.check_box :merge_requests_events, class: 'form-check-input'
= form.label :merge_requests_events, class: 'list-label form-check-label gl-ml-1' do
......
......@@ -9343,8 +9343,6 @@ CREATE TABLE application_settings (
elasticsearch_indexed_file_size_limit_kb integer DEFAULT 1024 NOT NULL,
enforce_namespace_storage_limit boolean DEFAULT false NOT NULL,
container_registry_delete_tags_service_timeout integer DEFAULT 250 NOT NULL,
kroki_url character varying,
kroki_enabled boolean,
elasticsearch_client_request_timeout integer DEFAULT 0 NOT NULL,
gitpod_enabled boolean DEFAULT false NOT NULL,
gitpod_url text DEFAULT 'https://gitpod.io/'::text,
......@@ -9367,13 +9365,15 @@ CREATE TABLE application_settings (
domain_denylist text,
domain_allowlist text,
new_user_signups_cap integer,
kroki_url text,
kroki_enabled boolean DEFAULT false NOT NULL,
secret_detection_revocation_token_types_url text,
encrypted_cloud_license_auth_token text,
encrypted_cloud_license_auth_token_iv text,
secret_detection_revocation_token_types_url text,
cloud_license_enabled boolean DEFAULT false NOT NULL,
disable_feed_token boolean DEFAULT false NOT NULL,
CONSTRAINT app_settings_registry_exp_policies_worker_capacity_positive CHECK ((container_registry_expiration_policies_worker_capacity >= 0)),
CONSTRAINT check_17d9558205 CHECK ((char_length((kroki_url)::text) <= 1024)),
CONSTRAINT check_17d9558205 CHECK ((char_length(kroki_url) <= 1024)),
CONSTRAINT check_2dba05b802 CHECK ((char_length(gitpod_url) <= 255)),
CONSTRAINT check_51700b31b5 CHECK ((char_length(default_branch_name) <= 255)),
CONSTRAINT check_57123c9593 CHECK ((char_length(help_page_documentation_base_url) <= 255)),
......@@ -17193,8 +17193,8 @@ CREATE TABLE user_details (
bio_html text,
cached_markdown_version integer,
webauthn_xid text,
other_role text,
provisioned_by_group_id bigint,
other_role text,
CONSTRAINT check_245664af82 CHECK ((char_length(webauthn_xid) <= 100)),
CONSTRAINT check_b132136b01 CHECK ((char_length(other_role) <= 100))
);
......@@ -23253,7 +23253,7 @@ ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_p
ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_63_pkey;
CREATE TRIGGER table_sync_trigger_ee39a25f9d AFTER INSERT OR DELETE OR UPDATE ON audit_events FOR EACH ROW EXECUTE PROCEDURE table_sync_function_2be879775d();
CREATE TRIGGER table_sync_trigger_ee39a25f9d AFTER INSERT OR DELETE OR UPDATE ON audit_events FOR EACH ROW EXECUTE FUNCTION table_sync_function_2be879775d();
ALTER TABLE ONLY chat_names
ADD CONSTRAINT fk_00797a2bf9 FOREIGN KEY (service_id) REFERENCES services(id) ON DELETE CASCADE;
......
%li
= form.check_box :member_events, class: 'form-check-input'
= form.label :member_events, class: 'list-label form-check-label gl-ml-1' do
%strong= s_('Webhooks|Member events')
%p.text-muted.gl-ml-1
= s_('Webhooks|This URL will be triggered when a member is added to a group')
......@@ -241,7 +241,7 @@ RSpec.describe GroupMember do
context 'group member webhooks', :sidekiq_inline do
let_it_be(:group) { create(:group_with_plan, plan: :gold_plan) }
let_it_be(:group_hook) { create(:group_hook, group: group, member_events: true) }
let(:user) { create(:user) }
let_it_be(:user) { create(:user) }
context 'fires the webhook when a member is added' do
before do
......@@ -271,8 +271,8 @@ RSpec.describe GroupMember do
end
context 'ancestor groups' do
let(:subgroup) { create(:group, parent: group) }
let(:subgroup_hook) { create(:group_hook, group: subgroup, member_events: true) }
let_it_be(:subgroup) { create(:group, parent: group) }
let_it_be(:subgroup_hook) { create(:group_hook, group: subgroup, member_events: true) }
it 'fires webhook twice when parent group has member_events webhook enabled' do
WebMock.stub_request(:post, subgroup_hook.url)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment