Enforce permissions correctly for /connections/<name>/channels, and improve tests.
Merge bug25413
A bit more coverage for a lonely module.
stable to default