Skip to content

worker: use SetRepoPermissions instead of *Unrestricted

Administrator requested to merge k/20220720-unrestricted-alternative into main

Created by: keegancsmith

We can just directly use SetRepoPermissions for unrestricted repositories. This has the benefit of creating the rows in repo permissions if the repository is not there yet.

Test Plan: updated unit tests and manually tested with on my devserver

mutation {
  setRepositoryPermissionsForBitbucketProject(
    projectKey: "BAM",
    codeHost: "RXh0ZXJuYWxTZXJ2aWNlOjE=",
    userPermissions: [],
    unrestricted: true,
  ) {
    alwaysNil
  }
}

Merge request reports

Loading