Fix lurking bug in edit_permissions

I don't have a test case, this is just code review; that string extrapolation will always raise.