http://jneen.net/
246951bba7
unmemoize read_ability
...
since it's only called once now in make_recipient
2017-08-03 09:07:18 -07:00
http://jneen.net/
934305ffa3
rm unused NewNote#subject
...
its functionality is swept into the project permission check
in NotificationRecipient#has_access? now
2017-08-03 09:07:18 -07:00
http://jneen.net/
9d53418acb
clearer argument name
2017-08-03 09:07:18 -07:00
http://jneen.net/
c2dd4239c9
short-circuit if there is no policy, and add :read_project check
2017-08-03 09:07:18 -07:00
http://jneen.net/
488e8e79dd
force queries to include notification settings
2017-08-03 09:07:18 -07:00
http://jneen.net/
3c56e41402
use a simple pluck, since equivalent filtering happens later
2017-08-03 09:07:18 -07:00
http://jneen.net/
18288fe21e
style fixes
2017-08-03 09:07:18 -07:00
http://jneen.net/
8386d69f8f
.notifiable_users: compact the passed-in users
2017-08-03 09:07:18 -07:00
http://jneen.net/
19309b9705
default the project to target.project
2017-08-03 09:07:18 -07:00
http://jneen.net/
46d0bfdcb9
use intersection and diff operators instead of each
2017-08-03 09:07:18 -07:00
http://jneen.net/
651f50ac00
make sure #custom_action is always defined
2017-08-03 09:07:18 -07:00
http://jneen.net/
618a3d125c
move Recipient to its own NotificationRecipient file
2017-08-03 09:07:18 -07:00
http://jneen.net/
618b5d3446
move the #build_* methods to static, parameterize the project
2017-08-03 09:07:18 -07:00
http://jneen.net/
4caa5a7e14
factor out .notifiable_users
2017-08-03 09:06:15 -07:00
http://jneen.net/
a4932d2da7
don't elevate to :watch if no @custom_action is provided
2017-08-03 09:06:15 -07:00
http://jneen.net/
b69e81c3e9
rm the @builder argument and factor out .notifiable_users
2017-08-03 09:06:15 -07:00
http://jneen.net/
943baa1392
move filtering logic into Recipient class
2017-08-03 09:06:15 -07:00
http://jneen.net/
b05e6efd53
add builder helpers with levels and start to separate out #filter!
2017-08-03 09:06:15 -07:00
http://jneen.net/
cdc4b4d7a0
make recipients mutative during the build
2017-08-03 09:06:15 -07:00
http://jneen.net/
734e21054a
move build_custom_key to Default
2017-08-03 09:06:15 -07:00
http://jneen.net/
b010a556b6
factor out the `target` argument to helpers
2017-08-03 09:06:15 -07:00
http://jneen.net/
947bff886b
move the build arguments to the initializers
2017-08-03 09:06:15 -07:00
http://jneen.net/
b1334ed94e
move the builders to classes with a #build
2017-08-03 09:06:15 -07:00
http://jneen.net/
cce1bc9a2f
use notification_setting_for_user_project in reject_users
2017-08-03 09:06:15 -07:00
http://jneen.net/
9cd46811d3
protect against nil project/group/setting
2017-08-03 09:06:15 -07:00
http://jneen.net/
b188e1b9e6
move notification_setting_for_user_project to a public class method
2017-08-03 09:06:15 -07:00
http://jneen.net/
80647364ff
move the ability check to reject_users_without_access
2017-08-03 09:06:15 -07:00
Sean McGivern
60bd2ae372
Ensure NotificationRecipientService doesn't modify participants
...
Even though it does modify the participants of the notification target in some
cases, this should have been safe, as different workers are responsible for
creating the notifications for each target. However, this is at best confusing,
and we should ensure we don't do that.
2017-06-28 12:14:44 +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
Valery Sizov
387c4b2c21
Backport of multiple_assignees_feature [ci skip]
2017-05-04 17:11:53 +03: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
Stan Hu
c4c3731159
Fix changes that were removed when code moved to NotificationReceipientService
2017-03-17 16:07:04 -07:00
Dongqing Hu
90ade76b2e
Resolve "Extract logic of who should receive notification into separate classes"
2017-03-17 17:56:04 +00:00