fix cross-shard permissions checks on wikis

fixes MBL-956

test plan:
 * access a wiki page from a shard it's not on (via the API)
 * it should work

Change-Id: I19a6cc1a87b302ad408a12f97d20d773ec198b51
Reviewed-on: https://gerrit.instructure.com/26252
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
URI encode username for js errors

Fixes gh-368

Change-Id: I8acbca5091c3a19a85986a670d5228f2ffc05b2f
Reviewed-on: https://gerrit.instructure.com/26205
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>