tvaultapi/src/main/java/com/tmobile/cso/vault/api/service/SSLCertificateService.java
private boolean validateAppname(String token,UserDetails userDetails, String appName) {
		 boolean isValid = false;
		 if(userDetails.isAdmin() || userDetails.isCertAdmin()) {
			 isValid = true;
		 }
		 else {
		 ResponseEntity<String> appResponse = getAllSelfServiceGroups(userDetails);
		 if (HttpStatus.OK.equals(appResponse.getStatusCode())) {
				JsonParser jsonParser = new JsonParser();
				JsonArray responseArray =  (JsonArray) jsonParser.parse(appResponse.getBody());
				 
				for (int i=0;i<responseArray.size();i++) {
					if(responseArray.get(i).toString().substring(1, responseArray.get(i).toString().length() - 1).equalsIgnoreCase(appName)) {
						isValid=true;
						break;
					}
				}
			}
	 }
		 return isValid;
	 }
/**
	  * Check if the application name is assigned to the user
	  * @param token
	  * @param userDetails
	  * @param appName
	  * @return
	  */
Check if the application name is assigned to the user
@param token
@param userDetails
@param appName
@return
Check if the application name is assigned to the user @param token @param userDetails @param appName @return
private boolean validateAppname(String token,UserDetails userDetails, String appName) {
		 boolean isValid = false;
		 if(userDetails.isAdmin() || userDetails.isCertAdmin()) {
			 isValid = true;
		 }
		 else {
		 ResponseEntity<String> appResponse = getAllSelfServiceGroups(userDetails);
		 if (HttpStatus.OK.equals(appResponse.getStatusCode())) {
				JsonParser jsonParser = new JsonParser();
				JsonArray responseArray =  (JsonArray) jsonParser.parse(appResponse.getBody());
				for (int i=0;i<responseArray.size();i++) {
					if(responseArray.get(i).toString().substring(1, responseArray.get(i).toString().length() - 1).equalsIgnoreCase(appName)) {
						isValid=true;
						break;
					}
				}
			}
	 }
		 return isValid;
	 }
private boolean validateAppname ( String token , UserDetails userDetails , String appName ) { boolean isValid = false ; if ( userDetails . isAdmin ( ) || userDetails . isCertAdmin ( ) ) { isValid = true ; } else { ResponseEntity < String > appResponse = getAllSelfServiceGroups ( userDetails ) ; if ( HttpStatus . OK . equals ( appResponse . getStatusCode ( ) ) ) { JsonParser jsonParser = new JsonParser ( ) ; JsonArray responseArray = ( JsonArray ) jsonParser . parse ( appResponse . getBody ( ) ) ; for ( int i = 0 ; i < responseArray . size ( ) ; i ++ ) { if ( responseArray . get ( i ) . toString ( ) . substring ( 1 , responseArray . get ( i ) . toString ( ) . length ( ) - 1 ) . equalsIgnoreCase ( appName ) ) { isValid = true ; break ; } } } } return isValid ; }
Check if the application name is assigned to the user
 @param token
 @param userDetails
 @param appName
 @return
Check if the application name is assigned to the user @param token @param userDetails @param appName @return