коммит произвёл
GitHub
родитель
f290745496
Коммит
c3ed07e679
@@ -1124,10 +1124,10 @@ func getAllTeams(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
c.SetPermissionError(model.PermissionSysconsoleReadComplianceDataRetentionPolicy)
|
||||
return
|
||||
}
|
||||
opts.ExcludePolicyConstrained = model.NewBool(true)
|
||||
opts.ExcludePolicyConstrained = model.NewPointer(true)
|
||||
}
|
||||
if c.App.SessionHasPermissionTo(*c.AppContext.Session(), model.PermissionSysconsoleReadComplianceDataRetentionPolicy) {
|
||||
opts.IncludePolicyID = model.NewBool(true)
|
||||
opts.IncludePolicyID = model.NewPointer(true)
|
||||
}
|
||||
|
||||
listPrivate := c.App.SessionHasPermissionTo(*c.AppContext.Session(), model.PermissionListPrivateTeams)
|
||||
@@ -1136,9 +1136,9 @@ func getAllTeams(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
offset := limit * c.Params.Page
|
||||
if listPrivate && listPublic {
|
||||
} else if listPrivate {
|
||||
opts.AllowOpenInvite = model.NewBool(false)
|
||||
opts.AllowOpenInvite = model.NewPointer(false)
|
||||
} else if listPublic {
|
||||
opts.AllowOpenInvite = model.NewBool(true)
|
||||
opts.AllowOpenInvite = model.NewPointer(true)
|
||||
} else {
|
||||
// The user doesn't have permissions to list private as well as public teams.
|
||||
c.Err = model.NewAppError("getAllTeams", "api.team.get_all_teams.insufficient_permissions", nil, "", http.StatusForbidden)
|
||||
@@ -1188,7 +1188,7 @@ func searchTeams(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
// policy ID may only be used through the /data_retention/policies endpoint
|
||||
props.PolicyID = nil
|
||||
if c.App.SessionHasPermissionTo(*c.AppContext.Session(), model.PermissionSysconsoleReadComplianceDataRetentionPolicy) {
|
||||
props.IncludePolicyID = model.NewBool(true)
|
||||
props.IncludePolicyID = model.NewPointer(true)
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
Ссылка в новой задаче
Block a user