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

**URL:** <https://drone.discourse.group/t/disable-restart-function-on-specific-builds-based-on-the-users-privillege/11364>\
**Category:** Drone Support\
**Created:** [October 1, 2020, 3:39am UTC](https://drone.discourse.group/t/disable-restart-function-on-specific-builds-based-on-the-users-privillege/11364 "2020-10-01T03:39:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![n-tien](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/n-tien/32/2571_2.png) [@n-tien](https://drone.discourse.group/u/n-tien)\
**Post date:** [October 1, 2020, 3:39am UTC](https://drone.discourse.group/t/disable-restart-function-on-specific-builds-based-on-the-users-privillege/11364/1 "2020-10-01T03:39:56Z")

</div>

Hi 👋

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 🙏

---

<div class="post-metadata">

**Author:** ![n-tien](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/n-tien/32/2571_2.png) [@n-tien](https://drone.discourse.group/u/n-tien)\
**Post date:** [October 2, 2020, 3:15am UTC](https://drone.discourse.group/t/disable-restart-function-on-specific-builds-based-on-the-users-privillege/11364/2 "2020-10-02T03:15:48Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [October 2, 2020, 12:02pm UTC](https://drone.discourse.group/t/disable-restart-function-on-specific-builds-based-on-the-users-privillege/11364/3 "2020-10-02T12:02:38Z")

</div>

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](http://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).

---

<div class="post-metadata">

**Author:** ![n-tien](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/n-tien/32/2571_2.png) [@n-tien](https://drone.discourse.group/u/n-tien)\
**Post date:** [October 5, 2020, 12:32am UTC](https://drone.discourse.group/t/disable-restart-function-on-specific-builds-based-on-the-users-privillege/11364/4 "2020-10-05T00:32:11Z")

</div>

@bradrydzewski  
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?

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [October 5, 2020, 12:16pm UTC](https://drone.discourse.group/t/disable-restart-function-on-specific-builds-based-on-the-users-privillege/11364/5 "2020-10-05T12:16:01Z")

</div>

> [@Oauth\_error with GitHub](https://drone.discourse.group/t/oauth-error-with-github/8099/4):
>
> This is also true for “restart”?

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

---

<div class="post-metadata">

**Author:** ![n-tien](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/n-tien/32/2571_2.png) [@n-tien](https://drone.discourse.group/u/n-tien)\
**Post date:** [October 6, 2020, 12:26am UTC](https://drone.discourse.group/t/disable-restart-function-on-specific-builds-based-on-the-users-privillege/11364/6 "2020-10-06T00:26:58Z")

</div>

Thank you for your response 🙇‍♂️
