geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r1036929 - /geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java
Date Fri, 19 Nov 2010 16:33:29 GMT
Author: genspring
Date: Fri Nov 19 16:33:28 2010
New Revision: 1036929

URL: http://svn.apache.org/viewvc?rev=1036929&view=rev
Log:
We don't want to add principal to a readonly subject.

Modified:
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java?rev=1036929&r1=1036928&r2=1036929&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java
Fri Nov 19 16:33:28 2010
@@ -329,7 +329,10 @@ public class ContextManager {
             throw new ProviderException("Invalid key: " + key.toString());
         }
         IdentificationPrincipal principal = new IdentificationPrincipal(subjectId);
-        subject.getPrincipals().add(principal);
+        
+        if(!subject.isReadOnly()){
+            subject.getPrincipals().add(principal);
+        }
         Context context = new Context(subjectId, acc, subject, callerPrincipal, groups);
         subjectIds.put(context.getId(), subject);
         subjectContexts.put(subject, context);



Mime
View raw message