Disable RESTART function on specific builds based on the user's privillege

Hi :wave:

I have a question regarding the drone UI privileges for the admin & users.
Currently, we have some jobs (/ branches) for production releases (stg, prod) and the admin is the only one who has the privilege to merge PR on GitHub (which triggers the release job).
Everything would be fine but the “restart build” button on the drone UI allows a non-admin user to restart the release jobs.
My question is "Is there a possible way to disable the restart button for the non-admin users on some specific builds (in this case release build)?"

Thank you :pray:

After reading the question, I think mine is too specific. Let’s me re-phase:

  • There are custom access privileges for braches on our GitHub (ex: only some can merge to master,…).
  • We are using the push trigger to run build jobs on drone
  • Is there a way to limit access to though build job the same way GitHub limit access?

Example: only A can merge (push) to master => only A can control (cancel, restart) the triggered buld jobs (from that push)

users with write access to the repository can cancel the pipeline. this is not something that can be customized. however, if you have advanced rbac requirements we would recommend taking a look at harness.io for your continuous delivery needs. you can seamlessly trigger harness pipelines from drone, and harness supports advanced rbac configurations and has much more advanced deployment / release capabilities than Drone (Harness also owns Drone).

1 Like

Thank you for your response. I will check harness out.
But just to be sure

users with write access to the repository can cancel the pipeline.

This is also true for “restart”? Is possible for you to point me to a document related to this?

yes, users with write access to a repository can also re-start a build.

1 Like

Thank you for your response :bowing_man: