You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by ff...@apache.org on 2018/04/13 04:56:24 UTC

[karaf] branch master updated: [KARAF-5700]handle \* scope specifically for ACL match

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 <fr...@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
ffang@apache.org.