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
6b709ed2
Commit
6b709ed2
authored
Dec 15, 2020
by
serenafang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only render member events if ee and group
Make a ee partial for member events
parent
67c8edce
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
15 deletions
+17
-15
app/views/shared/web_hooks/_form.html.haml
app/views/shared/web_hooks/_form.html.haml
+2
-6
db/structure.sql
db/structure.sql
+6
-6
ee/app/views/groups/hooks/_member_events.html.haml
ee/app/views/groups/hooks/_member_events.html.haml
+6
-0
ee/changelogs/unreleased/group-member-webhook-ui.yml
ee/changelogs/unreleased/group-member-webhook-ui.yml
+0
-0
ee/spec/models/group_member_spec.rb
ee/spec/models/group_member_spec.rb
+3
-3
No files found.
app/views/shared/web_hooks/_form.html.haml
View file @
6b709ed2
...
@@ -48,12 +48,8 @@
...
@@ -48,12 +48,8 @@
%strong
=
s_
(
'Webhooks|Confidential Issues events'
)
%strong
=
s_
(
'Webhooks|Confidential Issues events'
)
%p
.text-muted.gl-ml-1
%p
.text-muted.gl-ml-1
=
s_
(
'Webhooks|This URL will be triggered when a confidential issue is created/updated/merged'
)
=
s_
(
'Webhooks|This URL will be triggered when a confidential issue is created/updated/merged'
)
%li
-
if
@group
=
form
.
check_box
:member_events
,
class:
'form-check-input'
=
render_if_exists
'groups/hooks/member_events'
,
form:
form
=
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'
)
%li
%li
=
form
.
check_box
:merge_requests_events
,
class:
'form-check-input'
=
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
=
form
.
label
:merge_requests_events
,
class:
'list-label form-check-label gl-ml-1'
do
...
...
db/structure.sql
View file @
6b709ed2
...
@@ -9343,8 +9343,6 @@ CREATE TABLE application_settings (
...
@@ -9343,8 +9343,6 @@ CREATE TABLE application_settings (
elasticsearch_indexed_file_size_limit_kb
integer
DEFAULT
1024
NOT
NULL
,
elasticsearch_indexed_file_size_limit_kb
integer
DEFAULT
1024
NOT
NULL
,
enforce_namespace_storage_limit
boolean
DEFAULT
false
NOT
NULL
,
enforce_namespace_storage_limit
boolean
DEFAULT
false
NOT
NULL
,
container_registry_delete_tags_service_timeout
integer
DEFAULT
250
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
,
elasticsearch_client_request_timeout
integer
DEFAULT
0
NOT
NULL
,
gitpod_enabled
boolean
DEFAULT
false
NOT
NULL
,
gitpod_enabled
boolean
DEFAULT
false
NOT
NULL
,
gitpod_url
text
DEFAULT
'https://gitpod.io/'
::
text
,
gitpod_url
text
DEFAULT
'https://gitpod.io/'
::
text
,
...
@@ -9367,13 +9365,15 @@ CREATE TABLE application_settings (
...
@@ -9367,13 +9365,15 @@ CREATE TABLE application_settings (
domain_denylist
text
,
domain_denylist
text
,
domain_allowlist
text
,
domain_allowlist
text
,
new_user_signups_cap
integer
,
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
text
,
encrypted_cloud_license_auth_token_iv
text
,
encrypted_cloud_license_auth_token_iv
text
,
secret_detection_revocation_token_types_url
text
,
cloud_license_enabled
boolean
DEFAULT
false
NOT
NULL
,
cloud_license_enabled
boolean
DEFAULT
false
NOT
NULL
,
disable_feed_token
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
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_2dba05b802
CHECK
((
char_length
(
gitpod_url
)
<=
255
)),
CONSTRAINT
check_51700b31b5
CHECK
((
char_length
(
default_branch_name
)
<=
255
)),
CONSTRAINT
check_51700b31b5
CHECK
((
char_length
(
default_branch_name
)
<=
255
)),
CONSTRAINT
check_57123c9593
CHECK
((
char_length
(
help_page_documentation_base_url
)
<=
255
)),
CONSTRAINT
check_57123c9593
CHECK
((
char_length
(
help_page_documentation_base_url
)
<=
255
)),
...
@@ -17193,8 +17193,8 @@ CREATE TABLE user_details (
...
@@ -17193,8 +17193,8 @@ CREATE TABLE user_details (
bio_html
text
,
bio_html
text
,
cached_markdown_version
integer
,
cached_markdown_version
integer
,
webauthn_xid
text
,
webauthn_xid
text
,
other_role
text
,
provisioned_by_group_id
bigint
,
provisioned_by_group_id
bigint
,
other_role
text
,
CONSTRAINT
check_245664af82
CHECK
((
char_length
(
webauthn_xid
)
<=
100
)),
CONSTRAINT
check_245664af82
CHECK
((
char_length
(
webauthn_xid
)
<=
100
)),
CONSTRAINT
check_b132136b01
CHECK
((
char_length
(
other_role
)
<=
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
...
@@ -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
;
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
ALTER
TABLE
ONLY
chat_names
ADD
CONSTRAINT
fk_00797a2bf9
FOREIGN
KEY
(
service_id
)
REFERENCES
services
(
id
)
ON
DELETE
CASCADE
;
ADD
CONSTRAINT
fk_00797a2bf9
FOREIGN
KEY
(
service_id
)
REFERENCES
services
(
id
)
ON
DELETE
CASCADE
;
...
...
ee/app/views/groups/hooks/_member_events.html.haml
0 → 100644
View file @
6b709ed2
%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'
)
changelogs/unreleased/group-member-webhook-ui.yml
→
ee/
changelogs/unreleased/group-member-webhook-ui.yml
View file @
6b709ed2
File moved
ee/spec/models/group_member_spec.rb
View file @
6b709ed2
...
@@ -241,7 +241,7 @@ RSpec.describe GroupMember do
...
@@ -241,7 +241,7 @@ RSpec.describe GroupMember do
context
'group member webhooks'
,
:sidekiq_inline
do
context
'group member webhooks'
,
:sidekiq_inline
do
let_it_be
(
:group
)
{
create
(
:group_with_plan
,
plan: :gold_plan
)
}
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_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
context
'fires the webhook when a member is added'
do
before
do
before
do
...
@@ -271,8 +271,8 @@ RSpec.describe GroupMember do
...
@@ -271,8 +271,8 @@ RSpec.describe GroupMember do
end
end
context
'ancestor groups'
do
context
'ancestor groups'
do
let
(
:subgroup
)
{
create
(
:group
,
parent:
group
)
}
let
_it_be
(
:subgroup
)
{
create
(
:group
,
parent:
group
)
}
let
(
:subgroup_hook
)
{
create
(
:group_hook
,
group:
subgroup
,
member_events:
true
)
}
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
it
'fires webhook twice when parent group has member_events webhook enabled'
do
WebMock
.
stub_request
(
:post
,
subgroup_hook
.
url
)
WebMock
.
stub_request
(
:post
,
subgroup_hook
.
url
)
...
...
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