public boolean hasPermission(PerfTest perfTest, User user, Permission type) {
		return perfTest != null && (user.getRole().hasPermission(type) || user.equals(perfTest.getCreatedBy()));
	}
Check if given user has a permission on perftest.

@param perfTest perf test
@param user     user
@param type     permission type to check
@return true if it has
ngrinder-controller/src/main/java/org/ngrinder/perftest/service/PerfTestService.java