Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2019-08-15 20:37:36 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-08-15 20:37:36 +0300
commit3489dc3d7277bf478f68e1b3e0353b702f652acc (patch)
tree896dc6ef08d8347e992365594ce7c4b0d49e6ee4 /app/services/groups
parent23754943a7ec119f123694a93c79fc07c32b7ba5 (diff)
Allow disabling group/project email notifications
- Adds UI to configure in group and project settings - Removes notification configuration for users when disabled at group or project level
Diffstat (limited to 'app/services/groups')
-rw-r--r--app/services/groups/update_service.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/services/groups/update_service.rb b/app/services/groups/update_service.rb
index 73e1e00dc33..116756bacfe 100644
--- a/app/services/groups/update_service.rb
+++ b/app/services/groups/update_service.rb
@@ -46,6 +46,11 @@ module Groups
params.delete(:parent_id)
end
+ # overridden in EE
+ def remove_unallowed_params
+ params.delete(:emails_disabled) unless can?(current_user, :set_emails_disabled, group)
+ end
+
def valid_share_with_group_lock_change?
return true unless changing_share_with_group_lock?
return true if can?(current_user, :change_share_with_group_lock, group)