[MM-42068] Add check to stop custom groups linking to teams and channels (#19633)
* tools updates * Revert "tools updates" This reverts commit 6293297b55803c5a263e200ebd80192899666ae9. * stop custom groups linking to teams and channels * updating test and changing logic Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local> Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
Этот коммит содержится в:
@@ -297,6 +297,17 @@ func linkGroupSyncable(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
group, groupErr := c.App.GetGroup(c.Params.GroupId, nil)
|
||||
if groupErr != nil {
|
||||
c.Err = groupErr
|
||||
return
|
||||
}
|
||||
|
||||
if group.Source != model.GroupSourceLdap {
|
||||
c.Err = model.NewAppError("Api4.linkGroupSyncable", "app.group.crud_permission", nil, "", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
auditRec := c.MakeAuditRecord("linkGroupSyncable", audit.Fail)
|
||||
defer c.LogAuditRec(auditRec)
|
||||
auditRec.AddMeta("group_id", c.Params.GroupId)
|
||||
|
||||
Ссылка в новой задаче
Block a user