Projects can't run new builds when original user is disabled

We had an admin leave recently and his Bitbucket account was disabled as part of the offboarding. After that, none of the Drone projects he originally enabled would build, either by webhook or by manual build. Once I disabled and re-enabled the project, everything built just fine. Is there any resolution to this, or is it an inherent side effect of the way user registration and permissions work?

This is a side-effect of oauth, which grants access to a resources on behalf of a user. Drone has to access a repository on behalf of a user, and if that user has their access revoked, it causes problems. If you delete a user from Drone that is no longer part of your organization, Drone will attempt to re-assign ownership of all repositories. Otherwise you need to disable and re-enable, or you can use the chown command [1]

[1] drone repo chown | Drone

1 Like