The projects page was showing the project listing directly under the navbar
with no spacing. This adds spacing to have the elements offset.
The table is showing using the common "repositories" class, however it can't
be changed directly since several other table displays use the same class, and
have adequate top margin spacing. We create a new class for the one-off use
on the projects page.
allow advertising gitblit privileges for external URLs
commit c20191fc09 enabled support
for hiding internal URLs, but didn't consider that it broke the
evaluation of permissions (used for tickets, etc.), and caused
a NPE on repoUrl.permission when trying to view the TicketPage.
With all internal mechanisms disabled, it would result in the
first URL being external with unknown permissions. This adds an
option to use internal permissions even for external URLs.
Note that this does not grant any additional permissions, but
does offer the option to have gitblit advertise the full set of
what is allowed, even if the external URL imposes additional
restrictions.
Previously used request scheme, but request scheme is unrelated to
the URL being generated. Instead, base the permission capping on the
scheme of the URL itself.
Added git.sshDisplay{Port|Host} to hide port forward.
Running gitblit in a container it's easy to expose the ssh on the default port.
Using git.sshDisplayPort/git.sshDisplayHost you can expose the forwarded address
as the official location.
- try userRealm as a file only if class is not found, other exeptions are real error
- log userService only after setup, for better logging, as it can use gitblit.properties for custom .toString
Reworked NetBeans project to be based on the pom.xml rather than the build.xml.
Maven pom.xml is the new default for organising NetBeans projects, but the structure of the gitblit source folder is unusual because of the placement of the bugtraq source in the tree and Maven does not support this by default. This change introduces Maven Build Helper plugin to integrate the additional source locations. This is preferable to using nbproject\project.xml because 1) there is no need to generate the classpath for that file from build.moxie and 2) the POM generated by build.moxie can be re-used almost as-is, with the following additional configuration.
Additional Maven Build Helper (add under build/plugins):
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source-bugtraq</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/bugtraq</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source-bugtraq</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/bugtraq</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/main/resources</directory>
<targetPath>resources</targetPath>
<excludes>
<exclude>**/junk/**</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>add-test-resources</id>
<phase>generate-test-resources</phase>
<goals>
<goal>add-test-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/test/resources</directory>
<targetPath>resources</targetPath>
<excludes>
<exclude>**/junk/**</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
Source configuration (add at the end of pom.xml):
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>