portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r692412 - in /portals/jetspeed-2/portal/branches/security-refactoring: components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/ jetspeed-api/src/main/java/org/apache/jetspeed/security/ jetspeed-api/src/main/java/org/apa...
Date Fri, 05 Sep 2008 11:17:46 GMT
Author: ate
Date: Fri Sep  5 04:17:45 2008
New Revision: 692412

URL: http://svn.apache.org/viewvc?rev=692412&view=rev
Log:
- adding getPrincipalsByAttribute method to JetspeedPrincipalManager
- fix UserSubjectPrincipal: the target subject cannot be created before the UserSubjectPrincipal
itself is created so needs to be set afterwards

Modified:
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipalManager.java
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/UserSubjectPrincipal.java
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAccessManager.java

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipalManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipalManager.java?rev=692412&r1=692411&r2=692412&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipalManager.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipalManager.java
Fri Sep  5 04:17:45 2008
@@ -128,6 +128,11 @@
         return jpam.getPrincipals(nameFilter, principalType);
     }
 
+    public List<JetspeedPrincipal> getPrincipalsByAttribute(String attributeName, String
attributeValue)
+    {
+        return jpam.getPrincipalsByAttribute(attributeName, attributeValue, principalType);
+    }
+
     public void removePrincipal(String name) throws PrincipalNotFoundException, PrincipalNotRemovableException,
                                             DependentPrincipalException
     {

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java?rev=692412&r1=692411&r2=692412&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java
Fri Sep  5 04:17:45 2008
@@ -36,6 +36,8 @@
 
     List<JetspeedPrincipal> getPrincipals(String nameFilter);
     
+    List<JetspeedPrincipal> getPrincipalsByAttribute(String attributeName, String attributeValue);
+    
     JetspeedPrincipal newPrincipal(String name, boolean mapped);
 
     JetspeedPrincipal newTransientPrincipal(String name);

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/UserSubjectPrincipal.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/UserSubjectPrincipal.java?rev=692412&r1=692411&r2=692412&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/UserSubjectPrincipal.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/UserSubjectPrincipal.java
Fri Sep  5 04:17:45 2008
@@ -28,11 +28,11 @@
 public class UserSubjectPrincipal implements Principal
 {
     private final User user;
-    private final Subject subject;
-    public UserSubjectPrincipal(User user, Subject subject)
+    private Subject subject;
+    
+    public UserSubjectPrincipal(User user)
     {
         this.user = user;
-        this.subject = subject;
     }
     public String getName()
     {
@@ -46,4 +46,9 @@
     {
         return subject;
     }
+    
+    public void setSubject(Subject subject)
+    {
+        this.subject = subject;
+    }
 }

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAccessManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAccessManager.java?rev=692412&r1=692411&r2=692412&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAccessManager.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAccessManager.java
Fri Sep  5 04:17:45 2008
@@ -35,6 +35,8 @@
 
     List<JetspeedPrincipal> getPrincipals(String nameFilter, JetspeedPrincipalType
type);
 
+    List<JetspeedPrincipal> getPrincipalsByAttribute(String attributeName, String attributeValue,
JetspeedPrincipalType type);
+
     List<String> getPrincipalNames(String nameFilter, JetspeedPrincipalType type);
 
     List<JetspeedPrincipal> getAssociatedFrom(String principalName, JetspeedPrincipalType
from, JetspeedPrincipalType to, String associationName);



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message