Commit graph

23 commits

Author SHA1 Message Date
Brian Neel
9770c57fab Re-enable SqlInjection and CommandInjection 2017-08-08 10:50:54 -04:00
Sean McGivern
57a5544f88 Remove events column from notification settings
This was migrated to separate columns in 9.4, and now just needs to be removed
for real.
2017-07-31 11:18:55 +01:00
Tiago Botelho
34f57b462b Fix current feature related specs 2017-06-28 11:32:34 +01:00
Sean McGivern
e94c1028c1 Deserialise existing custom notification settings
Create a post-deployment migration to update all existing notification settings
with at least one custom level enabled to the new format. Also handle the same
conversion when updating settings, to catch any stragglers.
2017-06-15 15:15:13 +01:00
Sean McGivern
f4b5fcbca1 Add columns for custom notification settings
Add columns for each custom notification level, defaulting to null. Read from
those columns if non-null, otherwise fall back to the serialized column. Writing
will write to the new column if `events` isn't manually set.
2017-06-15 15:14:45 +01:00
Yorick Peterse
5819ca1a24
Added Cop to blacklist polymorphic associations
One should really use a separate table instead of using polymorphic
associations.

See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11168 for
more information.
2017-06-07 17:36:55 +02:00
Sean McGivern
a1805cbcd5 Quiet pipeline emails
1. Never send a pipeline email to anyone other than the user who created
   the pipeline.
2. Only send pipeline success emails to people with the custom
   notification setting for enabled. Watchers and participants will
   never receive this.
3. When custom settings are unset (for new settings and legacy ones),
   act as if failed_pipeline is set.
2017-04-03 13:59:48 +01:00
Douwe Maan
b7d8df503c Enable Style/MutableConstant 2017-02-23 09:31:56 -06:00
Lin Jen-Shin
ce7c632f50 Introduce EXCLUDED_WATCHER_EVENTS to exclude events
for watchers. Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8176#note_20920905
2017-01-05 19:53:56 +08:00
Lin Jen-Shin
8ea702cfe5 Revert "Split notification integration into another branch"
This reverts commit 1404aa8677.
2016-10-17 07:24:48 +00:00
Lin Jen-Shin
1404aa8677 Split notification integration into another branch 2016-09-14 19:34:24 +08:00
Lin Jen-Shin
4add6ca6ec Try to integrate the email into notification system 2016-09-13 19:09:53 +08:00
Sean McGivern
ea25e0918b Exclude projects pending delete from notifications
If the Sidekiq job fails for some reason, a project can be 'stuck'
pending deletion. The project can't be viewed, so it shouldn't be
available through the notification settings association as this will
throw an exception when we try to show the link.
2016-07-07 20:49:17 +01:00
Felipe Artur
89a2c8730b Implement custom notification level options 2016-06-15 11:47:50 -03:00
Felipe Artur
8f6d43e0fe Remove notification level from user model 2016-06-10 10:58:13 -03:00
Phil Hughes
e141a1c6f1 Notifications dropdown on project page now has descriptions
This is part of #12758
2016-06-07 15:02:00 +01:00
Jeroen van Baarsen
f1479b56b7
Remove the annotate gem and delete old annotations
In 8278b763d9 the default behaviour of annotation
has changes, which was causing a lot of noise in diffs. We decided in #17382
that it is better to get rid of the whole annotate gem, and instead let people
look at schema.rb for the columns in a table.

Fixes: #17382
2016-05-09 18:00:28 +02:00
Zeger-Jan van de Weg
47da013cf8 Annotate the models 2016-05-06 08:27:46 +02:00
Douglas Barbosa Alexandre
73fdd4b83d Use Hash instead of Array on NotificationSetting#level enum 2016-04-11 10:23:40 -03:00
Douglas Barbosa Alexandre
ee497599cc Use default_value_for to set default NotificationSetting#level 2016-04-08 17:24:27 -03:00
Dmitriy Zaporozhets
71e7b39843 Refactor creating notification setting with defaults
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Dmitriy Zaporozhets
359157c097 Introduce NotificationSetting to user interface
* visiting project will create notification setting if missing
* change notification setting per project even without membership
* use notification settings instead of membership on profile page

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Dmitriy Zaporozhets
31b0e53015 Introduce NotificationSetting model
It will hold notification setting per group or per project. It will
allow get rid of notification level stored in Member model

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00