agave-systems/systems-core/src/main/java/org/iplantc/service/systems/manager/SystemManager.java
/**
	 * Returns true if the api user has a role of RoleType.USER or higher.
	 * @param system
	 * @param apiUsername
	 * @return true if the api user has a role of RoleType.USER or higher. false otherwise
	 * @throws SystemException
	 */
Returns true if the api user has a role of RoleType.USER or higher.
@param system
@param apiUsername
@return true if the api user has a role of RoleType.USER or higher. false otherwise
@throws SystemException
Returns true if the api user has a role of RoleType . USER or higher . @param system @param apiUsername @return true if the api user has a role of RoleType . USER or higher . false otherwise @throws SystemException
public boolean isVisibleByUser(RemoteSystem system, String apiUsername)
	{
		if (StringUtils.isEmpty(apiUsername)) {
			throw new SystemException("No username provided.");
		} 
		if (system == null) {
			throw new SystemException("No shared system found matching that name");
		} 
		else 
		{	
			return (ServiceUtils.isAdmin(apiUsername) || 
					system.getOwner().equalsIgnoreCase(apiUsername) ||
					system.isPubliclyAvailable() || 
					system.getUserRole(apiUsername).canUse());
		}
	}
public boolean isVisibleByUser ( RemoteSystem system , String apiUsername ) { if ( StringUtils . isEmpty ( apiUsername ) ) { throw new SystemException ( "No username provided." ) ; } if ( system == null ) { throw new SystemException ( "No shared system found matching that name" ) ; } else { return ( ServiceUtils . isAdmin ( apiUsername ) || system . getOwner ( ) . equalsIgnoreCase ( apiUsername ) || system . isPubliclyAvailable ( ) || system . getUserRole ( apiUsername ) . canUse ( ) ) ; } }
Returns true if the api user has a role of RoleType.USER or higher.
Returns true if the api user has a role of RoleType . USER or higher .