The `populateVersion` closure had the wrong number of arguments for a method call. Fixing that then highlighted the scope of the private methods on UrlMappings was incorrect. Made them static as the mappings closure is static.
URLs such as /screencast/show/<string> and 'show wiki tab' were throwing exceptions because of assumptions that the corresponding URLs were valid. So I've added some URL constraints and updated controller actions to further check request parameters.
The Release plugin sends requests to the site with Accept: text/plain in the header. If the user publishing a plugin didn't have the required permission, the site would send a redirect to the 'not authorised' page - not particularly helpful for the Release plugin. It now sends a 403 for such requests.
If a plugin's name began with 'grails-', the URL mappings for the 'grailsRepo' requests failed because of some problematic logic. All types of file requested by Ivy (zips, POMs, XML descriptors, and their checksums) are not forwarded to the underlying Maven repository correctly now.
The global site search only included wiki pages and plugins in its results, but this doesn't make a lot of sense when you can search for screencasts etc. through a different interface. So, anything that's searchable can now be searched for via the site search.
The search results page would occasionally throw an exception saying that the property 'body' was missing on an object. It turns out that the pagination in the search results page was using the Searchable plugin's built-in results page rather than the application's override. The pagination links now send the requests to the correct URL - /search instead of /searchable. Fixes WEBSITE-168.
Springcache seemed to be having problems in production, generating an empty plugin list. Not sure what was going on, but now we simply generate the content as a string and dump it into an Ehcache instance. Hence the caching of the content is no longer tied to request processing, SiteMesh, etc. We can afford to do this because there is only ever one instance of the plugin list.
The size constraint on plugin zips for the PendingRelease domain class had been updated, but there was also a command object with the same set of constraints that hadn't been updated: PublishPluginCommand. The command object now imports the constraints from PendingRelease so we don't have to update them in two places.
The database was getting into a confused state when the PluginUpdateService threw a checked exception because the plugin tabs were created, but the corresponding plugin entry was not. This then prevented users from publishing the plugin until the database was fixed. Checked exceptions now trigger a rollback so the database can't get into that state.