···33import (
44 "fmt"
55 "net/http"
66- "slices"
76 "strconv"
8798 "tangled.org/core/api/tangled"
···364363 }
365364366365 // user can only delete branch if they are a collaborator in the repo that the branch belongs to
367367- perms := s.enforcer.GetPermissionsInRepo(user.Did, repo.Knot, repo.RepoIdentifier())
368368- if !slices.Contains(perms, "repo:push") {
366366+ if !s.acl.HasRepoPermission(r.Context(), repo, user.Did, "repo:push") {
369367 return nil
370368 }
371369