Skip to content

Commit

Permalink
Fix make permission error (mattermost#25860)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgdelacroix authored Jan 8, 2024
1 parent e1a27cf commit 6184c36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/channels/api4/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 6184c36

Please sign in to comment.