Repository: syncope
Updated Branches:
  refs/heads/master eb99e243b -> d19133ef5


[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/master
Commit: b68778e3482ac4cfae11112d897d8c56333ef4fe
Parents: 1d6451b
Author: Marco Di Sabatino Di Diodoro <mdisabat...@apache.org>
Authored: Thu May 21 17:06:00 2015 +0200
Committer: Marco Di Sabatino Di Diodoro <mdisabat...@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);
 

Reply via email to