You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2013/08/11 08:00:34 UTC
svn commit: r1512873 -
/directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/handlers/MetaAttributeHandler.java
Author: kayyagari
Date: Sun Aug 11 06:00:34 2013
New Revision: 1512873
URL: http://svn.apache.org/r1512873
Log:
do not use path segments while building the location URL
Modified:
directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/handlers/MetaAttributeHandler.java
Modified: directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/handlers/MetaAttributeHandler.java
URL: http://svn.apache.org/viewvc/directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/handlers/MetaAttributeHandler.java?rev=1512873&r1=1512872&r2=1512873&view=diff
==============================================================================
--- directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/handlers/MetaAttributeHandler.java (original)
+++ directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/handlers/MetaAttributeHandler.java Sun Aug 11 06:00:34 2013
@@ -88,14 +88,10 @@ public class MetaAttributeHandler implem
User user = ctx.getUser();
SimpleAttribute location = new SimpleAttribute( "location" );
- String locationVal = ctx.getUriInfo().getAbsolutePath().toString();
- List<PathSegment> pathSegLst = ctx.getUriInfo().getPathSegments();
- if( !pathSegLst.isEmpty() )
- {
- locationVal = locationVal.replace( pathSegLst.get( pathSegLst.size() -1 ).getPath(), "" );
- }
+ String locationVal = ctx.getUriInfo().getBaseUri().toString();
+ locationVal = locationVal + "Users/" + user.getId();
- location.setValue( locationVal + user.getId() );
+ location.setValue( locationVal );
atList.add( location );
ComplexAttribute ct = new ComplexAttribute( bt.getName(), atList );