]> source.dussan.org Git - gitblit.git/commitdiff
Do not send ticket emails to disabled users
authorJames Moger <james.moger@gitblit.com>
Fri, 7 Mar 2014 12:54:14 +0000 (07:54 -0500)
committerJames Moger <james.moger@gitblit.com>
Fri, 7 Mar 2014 12:54:14 +0000 (07:54 -0500)
src/main/java/com/gitblit/tickets/TicketNotifier.java

index a8ebc9e7f9208c7f4026e1b08f63dd542111d311..313f1a7da394c6bb4e896dbb7bf214b7400e8613 100644 (file)
@@ -523,7 +523,7 @@ public class TicketNotifier {
                Set<String> toAddresses = new TreeSet<String>();
                for (String name : ticket.getParticipants()) {
                        UserModel user = userManager.getUserModel(name);
-                       if (user != null) {
+                       if (user != null && !user.disabled) {
                                if (!StringUtils.isEmpty(user.emailAddress)) {
                                        if (user.canView(repository)) {
                                                toAddresses.add(user.emailAddress);
@@ -561,7 +561,7 @@ public class TicketNotifier {
                Set<String> ccAddresses = new TreeSet<String>();
                for (String name : ccs) {
                        UserModel user = userManager.getUserModel(name);
-                       if (user != null) {
+                       if (user != null && !user.disabled) {
                                if (!StringUtils.isEmpty(user.emailAddress)) {
                                        if (user.canView(repository)) {
                                                ccAddresses.add(user.emailAddress);