[MM-64630] Fix an issue where multiple channels can't be removed from policies (#32164)
* Fix an issue where multiple channels can't be removed from policies * actually fix the issue * use hardcoded limit * simplify removal
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d8758f8984
Коммит
0809ce7a62
@@ -183,6 +183,7 @@ func (a *App) UnassignPoliciesFromChannels(rctx request.CTX, policyID string, ch
|
||||
cps, _, err := a.Srv().Store().AccessControlPolicy().SearchPolicies(rctx, model.AccessControlPolicySearch{
|
||||
Type: model.AccessControlPolicyTypeChannel,
|
||||
ParentID: policyID,
|
||||
Limit: 1000,
|
||||
})
|
||||
if err != nil {
|
||||
return model.NewAppError("UnassignPoliciesFromChannels", "app.pap.unassign_access_control_policy_from_channels.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
|
||||
@@ -341,7 +341,7 @@ func TestAssignAccessControlPolicyToChannels(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestUnAssignPoliciesFromChannels(t *testing.T) {
|
||||
func TestUnassignPoliciesFromChannels(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user