[Yanel-commits] rev 26060 -
public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources
michi at wyona.com
michi at wyona.com
Tue Jul 17 16:48:32 CEST 2007
Author: michi
Date: 2007-07-17 16:48:32 +0200 (Tue, 17 Jul 2007)
New Revision: 26060
Modified:
public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
Log:
thanks to pointer of Josias one can use the getEnvironment
Modified: public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
===================================================================
--- public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java 2007-07-17 12:33:25 UTC (rev 26059)
+++ public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java 2007-07-17 14:48:32 UTC (rev 26060)
@@ -56,7 +56,6 @@
import org.wyona.yarep.util.RepoPath;
import org.wyona.security.core.api.Identity;
-import org.wyona.security.core.api.IdentityMap;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
@@ -101,8 +100,6 @@
private static Category log = Category.getInstance(XMLResource.class);
- private static String IDENTITY_MAP_KEY = "identity-map";
-
/**
*
*/
@@ -703,11 +700,8 @@
* Get username from session
*/
private String getUsername() {
- IdentityMap im = (IdentityMap) getRequest().getSession(true).getAttribute(IDENTITY_MAP_KEY);
- if (im != null) {
- Identity identity = (Identity)im.get(getRealm().getID());
- if (identity != null) return identity.getUsername();
- }
+ Identity identity = getEnvironment().getIdentity();
+ if (identity != null) return identity.getUsername();
return null;
}
}
More information about the Yanel-commits
mailing list