# Drone 1.2.0 promoting builds without admin

**URL:** <https://drone.discourse.group/t/drone-1-2-0-promoting-builds-without-admin/11210>\
**Category:** Drone Support\
**Created:** [June 19, 2019, 8:38pm UTC](https://drone.discourse.group/t/drone-1-2-0-promoting-builds-without-admin/11210 "2019-06-19T20:38:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yellowmegaman](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/yellowmegaman/32/3786_2.png) [@yellowmegaman](https://drone.discourse.group/u/yellowmegaman)\
**Post date:** [June 19, 2019, 8:38pm UTC](https://drone.discourse.group/t/drone-1-2-0-promoting-builds-without-admin/11210/1 "2019-06-19T20:38:57Z")

</div>

Hello there! Right now access if pretty much fine-grained, users can only see repos that are allowed for their teams on github, but on issue left - can’t find a way in the docs to promote a build for a user that is not admin. Any way to do that?

Giving him admin is dangerous, since he’s a newcomer, but we’d like to give him ability to promote build from his own repos.

He’s administrator of his own repos. Isn’t it enough?

Thanks in advance for the info!

---

<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:** [June 19, 2019, 8:46pm UTC](https://drone.discourse.group/t/drone-1-2-0-promoting-builds-without-admin/11210/2 "2019-06-19T20:46:31Z")

</div>

> Giving him admin is dangerous, since he’s a newcomer, but we’d like to give him ability to promote build from his own repos.

Sorry if I am misunderstanding, but a repository owner can always promote their own repositories. Promoting a build requires admin access to the repository [1], not admin access to all of Drone.

[1] as of Drone 1.2.1 repository write access is required to promote a build

---

<div class="post-metadata">

**Author:** ![yellowmegaman](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/yellowmegaman/32/3786_2.png) [@yellowmegaman](https://drone.discourse.group/u/yellowmegaman)\
**Post date:** [June 19, 2019, 9:08pm UTC](https://drone.discourse.group/t/drone-1-2-0-promoting-builds-without-admin/11210/3 "2019-06-19T21:08:20Z")

</div>

Actually drone gives him client 404 on promoting build from repo he created himself + I’ve added additional repo admin team, he’s part of.

---

<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:** [June 19, 2019, 9:16pm UTC](https://drone.discourse.group/t/drone-1-2-0-promoting-builds-without-admin/11210/4 "2019-06-19T21:16:45Z")

</div>

I cannot reproduce what you are describing. I can promote with admin access to a repository and do not require admin access to Drone itself. You can examine the relevant source code.

- Route implements `CheckAdminAccess` middleware [1]
- `CheckAdminAccess` looks at repository permission for admin access [2] which comes from the `permissions` object in the github repository endpoint [3]

Since I am unable to reproduce the behavior you are describing, and since other users are successfully using the promotion feature without issue, the feature appears to be working as expected.

[1] [https://github.com/drone/drone/blob/v1.2.0/handler/api/api.go#L188](https://github.com/drone/drone/blob/v1.2.0/handler/api/api.go#L188)  
[2] [https://github.com/drone/drone/blob/v1.2.0/handler/api/acl/check\_test.go#L435](https://github.com/drone/drone/blob/v1.2.0/handler/api/acl/check_test.go#L435)  
[3] [https://developer.github.com/v3/repos/#get](https://developer.github.com/v3/repos/#get)

---

<div class="post-metadata">

**Author:** ![yellowmegaman](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/yellowmegaman/32/3786_2.png) [@yellowmegaman](https://drone.discourse.group/u/yellowmegaman)\
**Post date:** [June 20, 2019, 7:07am UTC](https://drone.discourse.group/t/drone-1-2-0-promoting-builds-without-admin/11210/5 "2019-06-20T07:07:08Z")

</div>

You are totally right, sorry, feedback was erroneous, user tried to promote non-existing build in another repo.

Thanks Brad!!
