code: protected Project filterProjectByPermission(final Project project, final User user,
        final Permission.Type type) {
      return filterProjectByPermission(project, user, type, null);
    }
docs: Filter Project based on user authorization
  
  @param project project
  @param user user
  @param type permission allowance
  @return authorized project itself or null if the project is not authorized