This is an automated email from the ASF dual-hosted git repository.

npeltier pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-pipes.git


The following commit(s) were added to refs/heads/master by this push:
     new 40a4148  SLING-7533 set creds as null if no service user is configured
40a4148 is described below

commit 40a414803cb5daf4c21974dd8fed1dcca89b9f9d
Author: Nicolas Peltier <[email protected]>
AuthorDate: Mon Mar 5 10:23:21 2018 +0100

    SLING-7533 set creds as null if no service user is configured
    
    also add a warning in refresh monitor pipes in case nothing is configured 
to explain void result
---
 src/main/java/org/apache/sling/pipes/internal/PlumberImpl.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/pipes/internal/PlumberImpl.java 
b/src/main/java/org/apache/sling/pipes/internal/PlumberImpl.java
index 0c6c713..7ebce3b 100644
--- a/src/main/java/org/apache/sling/pipes/internal/PlumberImpl.java
+++ b/src/main/java/org/apache/sling/pipes/internal/PlumberImpl.java
@@ -130,7 +130,7 @@ public class PlumberImpl implements Plumber, JobConsumer, 
PlumberMXBean {
     @Activate
     public void activate(Configuration configuration){
         this.configuration = configuration;
-        serviceUser = Collections.singletonMap(SUBSERVICE, 
configuration.serviceUser());
+        serviceUser = configuration.serviceUser() != null ? 
Collections.singletonMap(SUBSERVICE, configuration.serviceUser()) : null;
         allowedUsers = Arrays.asList(configuration.authorizedUsers());
         registry = new HashMap<>();
         registerPipe(BasePipe.RESOURCE_TYPE, BasePipe.class);
@@ -419,6 +419,8 @@ public class PlumberImpl implements Plumber, JobConsumer, 
PlumberMXBean {
             } catch (Exception e) {
                 log.error("failed to execute the pipe", e);
             }
+        } else {
+            log.warn("no service user configured, pipes can't be monitored");
         }
         return beans;
     }

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to