You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ge...@apache.org on 2010/11/19 17:33:29 UTC

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

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);