agave-files/files-core/src/main/java/org/iplantc/service/io/permissions/PermissionManager.java
/**
	 * Checks whether path is under the virtual home directory of the user
	 * on the system assigned to the current PermissionManager. The user's
	 * virtual home is defined as:
	 * 
	 * <pre><code>system.storageConfig.rootDir + / + system.storageConfig.homeDir + / username</code></pre>
	 * 
	 * @param systemAbsolutePath absolute path on remote system
	 * @return true if path is relative to user home
	 */
Checks whether path is under the virtual home directory of the user
on the system assigned to the current PermissionManager. The user's
virtual home is defined as.



@param systemAbsolutePath absolute path on remote system
@return true if path is relative to user home
Checks whether path is under the virtual home directory of the user on the system assigned to the current PermissionManager . The user ' s virtual home is defined as . @param systemAbsolutePath absolute path on remote system @return true if path is relative to user home
public boolean isUnderUserHomeDirOnPublicSystem(String systemAbsolutePath)
	{
		SimpleTimer st = null;
		if (log.isDebugEnabled()) st = SimpleTimer.start("isUnderUserHomeDirOnPublicSystem");
		if (remoteSystem.isPubliclyAvailable())
		{
			String homeDir;
			try {
				if (remoteDataClient == null) {
					homeDir = remoteSystem.getRemoteDataClient().resolvePath("");
				} else {
					homeDir = remoteDataClient.resolvePath("");
				}
			} catch (Exception e) {
				if (st != null) log.debug(st.getShortStopMsg());
				return false;
			}
			homeDir += "/" + apiUsername;
			homeDir = homeDir.replaceAll("/+", "/");
			if (st != null) log.debug(st.getShortStopMsg());
			return StringUtils.startsWithIgnoreCase(cleanPath(systemAbsolutePath) , homeDir);
		}
		else
		{
			if (st != null) log.debug(st.getShortStopMsg());
			return false;
		}
	}
public boolean isUnderUserHomeDirOnPublicSystem ( String systemAbsolutePath ) { SimpleTimer st = null ; if ( log . isDebugEnabled ( ) ) st = SimpleTimer . start ( "isUnderUserHomeDirOnPublicSystem" ) ; if ( remoteSystem . isPubliclyAvailable ( ) ) { String homeDir ; try { if ( remoteDataClient == null ) { homeDir = remoteSystem . getRemoteDataClient ( ) . resolvePath ( "" ) ; } else { homeDir = remoteDataClient . resolvePath ( "" ) ; } } catch ( Exception e ) { if ( st != null ) log . debug ( st . getShortStopMsg ( ) ) ; return false ; } homeDir += "/" + apiUsername ; homeDir = homeDir . replaceAll ( "/+" , "/" ) ; if ( st != null ) log . debug ( st . getShortStopMsg ( ) ) ; return StringUtils . startsWithIgnoreCase ( cleanPath ( systemAbsolutePath ) , homeDir ) ; } else { if ( st != null ) log . debug ( st . getShortStopMsg ( ) ) ; return false ; } }
Checks whether path is under the virtual home directory of the user
 on the system assigned to the current PermissionManager.
Checks whether path is under the virtual home directory of the user on the system assigned to the current PermissionManager .