Fix issue where users may not follow links to private messages they belong to (#26001)

* Fix issue where users may not follow links to private messages they belong to

* Update tests
Этот коммит содержится в:
Daniel Espino García
2024-01-24 16:10:01 +01:00
коммит произвёл GitHub
родитель a7192dba8c
Коммит 409329c3d6
2 изменённых файлов: 20 добавлений и 7 удалений

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

@@ -3992,6 +3992,12 @@ func TestPostReminder(t *testing.T) {
func TestPostGetInfo(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
defer th.RestoreDefaultRolePermissions(th.SaveDefaultRolePermissions())
th.RemovePermissionFromRole(model.PermissionManagePrivateChannelMembers.Id, model.SystemUserRoleId)
th.RemovePermissionFromRole(model.PermissionManagePrivateChannelMembers.Id, model.ChannelUserRoleId)
th.RemovePermissionFromRole(model.PermissionManagePrivateChannelMembers.Id, model.TeamUserRoleId)
client := th.Client
sysadminClient := th.SystemAdminClient
sysadminClient.AddTeamMember(context.Background(), th.BasicTeam.Id, th.SystemAdminUser.Id)