agave-common/common-core/src/main/java/org/iplantc/service/common/auth/AuthorizationHelper.java
/**
      * Checks the local {@link #TRUSTED_ADMIN_FILE} in the service deployment
      * for the existence of the given user in the list of super users.
      * 
      * @param username
      * @return true if the username is present, false otherwise
      */
Checks the local  #TRUSTED_ADMIN_FILE in the service deployment
for the existence of the given user in the list of super users.

@param username
@return true if the username is present, false otherwise
Checks the local #TRUSTED_ADMIN_FILE in the service deployment for the existence of the given user in the list of super users . @param username @return true if the username is present false otherwise
private static boolean isUserInLocalConfigurationFile(String username) 
     {
         InputStream stream = null;
         try
         {
        	 stream = AuthorizationHelper.class.getClassLoader().getResourceAsStream(TRUSTED_ADMIN_FILE);
             String trustedUserList = IOUtils.toString(stream, "UTF-8");
             if (StringUtils.isNotEmpty(trustedUserList)) {
                 for(String user: trustedUserList.split(",")) {
                     if (username.equalsIgnoreCase(user.trim())) {
                         return true;
                     }
                 }
                 return false;
             } else {
                 return false;
             }
         }
         catch (IOException e)
         {
        	 log.warn("Failed to load trusted user file", e);
             return false;
         }
         finally {
        	 if (stream != null) try {stream.close();} catch (Exception e){} 
         }
     }
private static boolean isUserInLocalConfigurationFile ( String username ) { InputStream stream = null ; try { stream = AuthorizationHelper . class . getClassLoader ( ) . getResourceAsStream ( TRUSTED_ADMIN_FILE ) ; String trustedUserList = IOUtils . toString ( stream , "UTF-8" ) ; if ( StringUtils . isNotEmpty ( trustedUserList ) ) { for ( String user : trustedUserList . split ( "," ) ) { if ( username . equalsIgnoreCase ( user . trim ( ) ) ) { return true ; } } return false ; } else { return false ; } } catch ( IOException e ) { log . warn ( "Failed to load trusted user file" , e ) ; return false ; } finally { if ( stream != null ) try { stream . close ( ) ; } catch ( Exception e ) { } } }
Checks the local {@link #TRUSTED_ADMIN_FILE} in the service deployment
 for the existence of the given user in the list of super users.
Checks the local { @link #TRUSTED_ADMIN_FILE } in the service deployment for the existence of the given user in the list of super users .