agave-tags/tags-core/src/main/java/org/iplantc/service/tags/managers/TagPermissionManager.java
/**
	 * Calls client service to verify the given principal is valid.
	 * @param principal
	 * @return
	 * @throws Exception
	 */
Calls client service to verify the given principal is valid.
@param principal
@return
@throws Exception
Calls client service to verify the given principal is valid . @param principal @return @throws Exception
public boolean isValidPrincipal(String principal) throws PermissionValidationException {
		try {
			AgaveProfileServiceClient authClient = 
					new AgaveProfileServiceClient(TenancyHelper.resolveURLToCurrentTenant(Settings.IPLANT_PROFILE_SERVICE, tag.getTenantId()), 
												  Settings.COMMUNITY_PROXY_USERNAME, 
												  Settings.COMMUNITY_PROXY_PASSWORD);
			return authClient.getUser(principal) == null;
		} 
		catch (Exception e) {
			throw new PermissionValidationException("Unable to verify identity of the principal", e);
		}
	}
public boolean isValidPrincipal ( String principal ) throws PermissionValidationException { try { AgaveProfileServiceClient authClient = new AgaveProfileServiceClient ( TenancyHelper . resolveURLToCurrentTenant ( Settings . IPLANT_PROFILE_SERVICE , tag . getTenantId ( ) ) , Settings . COMMUNITY_PROXY_USERNAME , Settings . COMMUNITY_PROXY_PASSWORD ) ; return authClient . getUser ( principal ) == null ; } catch ( Exception e ) { throw new PermissionValidationException ( "Unable to verify identity of the principal" , e ) ; } }
Calls client service to verify the given principal is valid.
Calls client service to verify the given principal is valid .
// validate the user they are giving permissions to exists