MM-11230: Make permissions checks in commands failsafe. (#9392)

Also add additional unit tests to make sure the permissions tests are
completely solid.
Этот коммит содержится в:
George Goldberg
2018-09-12 15:32:05 +01:00
коммит произвёл Harrison Healey
родитель fba0f8e8b2
Коммит 0a5f792d2d
12 изменённых файлов: 582 добавлений и 133 удалений

Просмотреть файл

@@ -95,12 +95,7 @@ func TestInviteProvider(t *testing.T) {
msg: basicUser4.Username,
},
{
desc: "try to add a user to a direct channel",
expected: "api.command_invite.directchannel.app_error",
msg: userAndDMChannel,
},
{
desc: "try to add a user to a privante channel with no permission",
desc: "try to add a user to a private channel with no permission",
expected: "api.command_invite.private_channel.app_error",
msg: userAndInvalidPrivate,
},