From 6184c36e0b31a33a55fb99b6ab2ffb25f90c00e2 Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Mon, 8 Jan 2024 14:45:48 +0100 Subject: [PATCH] Fix make permission error (#25860) --- server/channels/api4/group.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/channels/api4/group.go b/server/channels/api4/group.go index d0c2b45dd03..4cd26292e19 100644 --- a/server/channels/api4/group.go +++ b/server/channels/api4/group.go @@ -832,7 +832,7 @@ func getGroupsByTeamCommon(c *Context, r *http.Request) ([]byte, *model.AppError } if !c.App.SessionHasPermissionToTeam(*c.AppContext.Session(), c.Params.TeamId, model.PermissionListTeamChannels) { - return nil, c.App.MakePermissionError(c.AppContext.Session(), []*model.Permission{model.PermissionListTeamChannels}) + return nil, model.MakePermissionError(c.AppContext.Session(), []*model.Permission{model.PermissionListTeamChannels}) } opts := model.GroupSearchOpts{ @@ -928,7 +928,7 @@ func getGroupsAssociatedToChannelsByTeam(c *Context, w http.ResponseWriter, r *h } if !c.App.SessionHasPermissionToTeam(*c.AppContext.Session(), c.Params.TeamId, model.PermissionListTeamChannels) { - c.Err = c.App.MakePermissionError(c.AppContext.Session(), []*model.Permission{model.PermissionListTeamChannels}) + c.Err = model.MakePermissionError(c.AppContext.Session(), []*model.Permission{model.PermissionListTeamChannels}) return }