MM-26015: ensure admin retains permissions to team after being removed from a team (#14961)
Summary: Ensure admin retains permissions to team after being removed from a team Ticket Link: https://mattermost.atlassian.net/browse/MM-26015
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
87be9bc2f5
Коммит
eabae5437b
@@ -52,4 +52,10 @@ func TestHasPermissionToTeam(t *testing.T) {
|
||||
th.RemoveUserFromTeam(th.BasicUser, th.BasicTeam)
|
||||
|
||||
assert.False(t, th.App.HasPermissionToTeam(th.BasicUser.Id, th.BasicTeam.Id, model.PERMISSION_LIST_TEAM_CHANNELS))
|
||||
|
||||
th.LinkUserToTeam(th.SystemAdminUser, th.BasicTeam)
|
||||
assert.True(t, th.App.HasPermissionToTeam(th.SystemAdminUser.Id, th.BasicTeam.Id, model.PERMISSION_LIST_TEAM_CHANNELS))
|
||||
th.RemoveUserFromTeam(th.SystemAdminUser, th.BasicTeam)
|
||||
// This used to fail before MM-26015
|
||||
assert.True(t, th.App.HasPermissionToTeam(th.SystemAdminUser.Id, th.BasicTeam.Id, model.PERMISSION_LIST_TEAM_CHANNELS))
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user