You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by md...@apache.org on 2015/05/21 17:06:36 UTC

syncope git commit: [SYNCOPE-669] Search filter in the notifications

Repository: syncope
Updated Branches:
  refs/heads/1_2_X 1d6451b5c -> b68778e34


[SYNCOPE-669] Search filter in the notifications


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b68778e3
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b68778e3
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b68778e3

Branch: refs/heads/1_2_X
Commit: b68778e3482ac4cfae11112d897d8c56333ef4fe
Parents: 1d6451b
Author: Marco Di Sabatino Di Diodoro <md...@apache.org>
Authored: Thu May 21 17:06:00 2015 +0200
Committer: Marco Di Sabatino Di Diodoro <md...@apache.org>
Committed: Thu May 21 17:06:00 2015 +0200

----------------------------------------------------------------------
 .../apache/syncope/core/notification/NotificationManager.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/b68778e3/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java b/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
index 63b54ec..341a0bd 100644
--- a/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
+++ b/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
@@ -303,11 +303,12 @@ public class NotificationManager {
                 if (events.isEmpty()) {
                     LOG.debug("No events found about {}", subject);
                 } else if (subjectType == null || subject == null
-                        || notification.getUserAbout() == null || notification.getRoleAbout() == null
+                        || (subjectType == SubjectType.USER && (notification.getUserAbout() == null
                         || searchDAO.matches(subject,
-                                SearchCondConverter.convert(notification.getUserAbout()), subjectType)
+                                SearchCondConverter.convert(notification.getUserAbout()), subjectType)))
+                        || subjectType == SubjectType.ROLE && (notification.getRoleAbout() == null
                         || searchDAO.matches(subject,
-                                SearchCondConverter.convert(notification.getRoleAbout()), subjectType)) {
+                                SearchCondConverter.convert(notification.getRoleAbout()), subjectType))) {
 
                     LOG.debug("Creating notification task for events {} about {}", events, subject);