MM-11230: Make permissions checks in commands failsafe. (#9392)
Also add additional unit tests to make sure the permissions tests are completely solid.
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
fba0f8e8b2
Коммит
0a5f792d2d
@@ -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,
|
||||
},
|
||||
|
||||
Ссылка в новой задаче
Block a user