tests: extract HTTP permissions tests to own test file
We're about to implement a lot more coverage of the permissions
mechanism. In preparation for that, establish a new test file
to hold permissions checks.
As part of this, we inline the important parts of the "req" helper
function.
Added signature for changeset
369aadf7a326