shiro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdem...@apache.org
Subject [3/3] shiro git commit: SHIRO-368: merging DomainPermission fix to trunk
Date Wed, 13 Jul 2016 20:08:00 GMT
SHIRO-368: merging DomainPermission fix to trunk

git-svn-id: https://svn.apache.org/repos/asf/shiro/trunk@1364195 13f79535-47bb-0310-9956-ffa450edef68


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

Branch: refs/heads/1.3.x
Commit: bdc0b7cab5ed3c1544f891405a71cc1c461aa3be
Parents: dbc0bb1
Author: Jared Bunting <jbunting@apache.org>
Authored: Sun Jul 22 00:04:52 2012 +0000
Committer: Brian Demers <bdemers@apache.org>
Committed: Wed Jul 13 13:23:07 2016 -0400

----------------------------------------------------------------------
 .../authz/permission/DomainPermissionTest.java  |  3 ++
 .../subject/SimplePrincipalCollectionTest.java  | 39 ++++++++++++++++++++
 .../org/apache/shiro/guice/ShiroModule.java     |  1 +
 3 files changed, 43 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/shiro/blob/bdc0b7ca/core/src/test/java/org/apache/shiro/authz/permission/DomainPermissionTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/shiro/authz/permission/DomainPermissionTest.java
b/core/src/test/java/org/apache/shiro/authz/permission/DomainPermissionTest.java
index fad0929..d853389 100644
--- a/core/src/test/java/org/apache/shiro/authz/permission/DomainPermissionTest.java
+++ b/core/src/test/java/org/apache/shiro/authz/permission/DomainPermissionTest.java
@@ -27,6 +27,9 @@ import java.util.Set;
 import static org.junit.Assert.*;
 import static org.junit.Assert.assertEquals;
 
+/**
+ * @since 1.3
+ */
 public class DomainPermissionTest {
     @Test
     public void testDefaultConstructor() {

http://git-wip-us.apache.org/repos/asf/shiro/blob/bdc0b7ca/core/src/test/java/org/apache/shiro/subject/SimplePrincipalCollectionTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/shiro/subject/SimplePrincipalCollectionTest.java
b/core/src/test/java/org/apache/shiro/subject/SimplePrincipalCollectionTest.java
new file mode 100644
index 0000000..f42fd1c
--- /dev/null
+++ b/core/src/test/java/org/apache/shiro/subject/SimplePrincipalCollectionTest.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.shiro.subject;
+
+import junit.framework.TestCase;
+import org.junit.Test;
+
+public class SimplePrincipalCollectionTest {
+    @Test
+    public void multiplePrincipalsTest()
+    {
+        SimplePrincipalCollection principalCollection = new SimplePrincipalCollection();
+        principalCollection.add("frank", "realm1");
+        principalCollection.add("johnny", "realm1");
+        principalCollection.add("Alberto", "realm2");
+
+        PrincipalCollection underTest = principalCollection;
+
+//        underTest.
+
+        System.out.println(principalCollection);
+    }
+}

http://git-wip-us.apache.org/repos/asf/shiro/blob/bdc0b7ca/support/guice/src/main/java/org/apache/shiro/guice/ShiroModule.java
----------------------------------------------------------------------
diff --git a/support/guice/src/main/java/org/apache/shiro/guice/ShiroModule.java b/support/guice/src/main/java/org/apache/shiro/guice/ShiroModule.java
index 00c40a4..a2714ad 100644
--- a/support/guice/src/main/java/org/apache/shiro/guice/ShiroModule.java
+++ b/support/guice/src/main/java/org/apache/shiro/guice/ShiroModule.java
@@ -52,6 +52,7 @@ public abstract class ShiroModule extends PrivateModule implements Destroyable
{
 
 	private Set<Destroyable> destroyables = Collections.newSetFromMap(new WeakHashMap<Destroyable,
Boolean>());
     public void configure() {
+        this.binder().requireExplicitBindings();
         // setup security manager
         bindSecurityManager(bind(SecurityManager.class));
         bindSessionManager(bind(SessionManager.class));


Mime
View raw message