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

ffang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/master by this push:
     new 7d53d9a  [KARAF-5700]handle \* scope specifically for ACL match
7d53d9a is described below

commit 7d53d9a8836ce4408de2a8ca7057b47b1b1ef2d7
Author: Freeman Fang <freeman.f...@gmail.com>
AuthorDate: Fri Apr 13 12:56:11 2018 +0800

    [KARAF-5700]handle \* scope specifically for ACL match
---
 .../impl/console/osgi/secured/SecuredSessionFactoryImpl.java      | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/secured/SecuredSessionFactoryImpl.java
 
b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/secured/SecuredSessionFactoryImpl.java
index 3f7f8f0..9b65826 100644
--- 
a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/secured/SecuredSessionFactoryImpl.java
+++ 
b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/secured/SecuredSessionFactoryImpl.java
@@ -333,7 +333,10 @@ public class SecuredSessionFactoryImpl extends 
SessionFactoryImpl implements Con
         }
         scope = scope.trim();
         synchronized (scopes) {
-            scopes.put(scope, config.getProperties());
+            if (scope.endsWith("*")) {
+                scope = "star";
+            }
+            scopes.put(scope, config.getProperties());                
         }
     }
 
@@ -345,6 +348,9 @@ public class SecuredSessionFactoryImpl extends 
SessionFactoryImpl implements Con
 
     private Dictionary<String, Object> getScopeConfig(String scope) {
         synchronized (scopes) {
+            if (scope.equals("*")) {
+                scope = "star";
+            }
             return scopes.get(scope);
         }
     }

-- 
To stop receiving notification emails like this one, please contact
ff...@apache.org.

Reply via email to