Author: bblfish
Date: Thu May 12 13:58:56 2011
New Revision: 1102310

URL: http://svn.apache.org/viewvc?rev=1102310&view=rev
Log:
CLEREZZA-520: creation a WebID for a non-admin users leads to a Basic-Auth 
login request. by placing the code in the appropriate doPriviledged setion it 
works again.

Modified:
    
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala

Modified: 
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala?rev=1102310&r1=1102309&r2=1102310&view=diff
==============================================================================
--- 
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala
 (original)
+++ 
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala
 Thu May 12 13:58:56 2011
@@ -144,14 +144,14 @@ class ProfilePanel {
                           @PathParam(value = "id") userName: String): Response 
= {
                val ppd: UriRef = getSuggestedPPDUri(userName)
                val webId: UriRef = new UriRef(ppd.getUnicodeString + "#me")
-               val webIDInfo = webIdGraphsService.getWebIDInfo(webId)
-               webIDInfo.localGraph.addAll(
-                       Arrays.asList(
-                               new TripleImpl(ppd, RDF.`type`, 
FOAF.PersonalProfileDocument),
-                               new TripleImpl(ppd, FOAF.primaryTopic, webId))
-               )
                return AccessController.doPrivileged(new 
PrivilegedAction[Response] {
                        def run: Response = {
+                               val webIDInfo = 
webIdGraphsService.getWebIDInfo(webId)
+                               webIDInfo.localGraph.addAll(
+                                       Arrays.asList(
+                                               new TripleImpl(ppd, RDF.`type`, 
FOAF.PersonalProfileDocument),
+                                               new TripleImpl(ppd, 
FOAF.primaryTopic, webId))
+                               )
                                var userInSystemGraph: GraphNode = 
userManager.getUserInSystemGraph(userName)
                                userInSystemGraph.replaceWith(webId)
                                return 
RedirectUtil.createSeeOtherResponse("../profile", uriInfo)


Reply via email to