Can't assign self as reviewer of other user's PRs #6233

Closed
opened 2025-11-02 06:49:18 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @cipherboy on GitHub (Nov 1, 2020).

  • Gitea version (or commit ref): v1.13.0-rc1
  • Git version: n/a
  • Operating system: Ubuntu
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (URLs inline)
    • No

Description

There seem to be multiple bugs with permissions around assigning reviewers:

  1. As an administrator assigned to a repository, I cannot edit reviewers for a pull request and e.g., assign myself, even though it isn't my PR.
    1. As user1, create user1/testing1

    2. As user1, add cipherboy-user2 as an administrator to the repo:
      Screenshot from 2020-11-01 10-21-48

    3. As user1, open a pull request.

    4. As cipherboy-user2, try to assign myself to review the pull request. However, I don't have permission to even edit reviewers -- shouldn't administrator collaborators have this access:
      Screenshot from 2020-11-01 10-27-31

  2. As an owner (cipherboy-user2 and user1) in an organization which has repos, I (cipherboy-user2) can edit PR's reviewers (yay! -- on individual repos I can't) but I can't assign myself as a reviewer on another user's PR. I can only assign other people (user3) as reviewers.
    1. Using user1 above, opens a PR in an organization with multiple owners.
      Screenshot from 2020-11-01 10-37-22
    2. Using cipherboy-user2 above, tries to assign cipherboy-user2 as a reviewer. -> cipherboy-user2 doesn't show up in the list. Can only assign other users (say, user3).
      Screenshot from 2020-11-01 10-37-56
    3. However, user1 can assign other reviewers (such as cipherboy-user2) just fine.
      Screenshot from 2020-11-01 10-38-39

Note: I believe both 1 and 2 to be the same issue just in different permission models (user's repo vs org's repos). Its just that my single user repo had only two people added, whereas the org had three people. If another user is added to the repo, cipherboy-user2 can assign cipherboy-user3 to review user1's PR.

Screenshots

Provided above, inline.

Originally created by @cipherboy on GitHub (Nov 1, 2020). - Gitea version (or commit ref): [v1.13.0-rc1](https://github.com/go-gitea/gitea/releases/tag/v1.13.0-rc1) - Git version: n/a - Operating system: Ubuntu - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (URLs inline) - [ ] No ## Description There seem to be multiple bugs with permissions around assigning reviewers: 1. As an administrator assigned to a repository, I cannot edit reviewers for a pull request and e.g., assign myself, even though it isn't my PR. 1. As `user1`, create [user1/testing1](https://try.gitea.io/user1/testing1) 2. As `user1`, add `cipherboy-user2` as an administrator to the repo: ![Screenshot from 2020-11-01 10-21-48](https://user-images.githubusercontent.com/914030/97807060-aa865080-1c2c-11eb-90b4-243959a32ff0.png) 3. As `user1`, open a [pull request](https://try.gitea.io/user1/testing1/pulls/1). 4. As `cipherboy-user2`, try to assign myself to review the pull request. However, I don't have permission to even edit reviewers -- shouldn't administrator collaborators have this access: ![Screenshot from 2020-11-01 10-27-31](https://user-images.githubusercontent.com/914030/97807094-e02b3980-1c2c-11eb-9bc6-8535efbd7bd2.png) 2. As an owner (`cipherboy-user2` and `user1`) in an organization which has repos, I (`cipherboy-user2`) can edit PR's reviewers (yay! -- on individual repos I can't) but I can't assign myself as a reviewer on another user's PR. I can only assign other people (`user3`) as reviewers. 1. Using `user1` above, [opens a PR in an organization with multiple owners](https://try.gitea.io/testing-org-user1/testing2/pulls/1). ![Screenshot from 2020-11-01 10-37-22](https://user-images.githubusercontent.com/914030/97807352-3ea4e780-1c2e-11eb-8866-d9215d02d7d0.png) 2. Using `cipherboy-user2` above, tries to assign `cipherboy-user2` as a reviewer. -> `cipherboy-user2` doesn't show up in the list. Can only assign other users (say, `user3`). ![Screenshot from 2020-11-01 10-37-56](https://user-images.githubusercontent.com/914030/97807367-52504e00-1c2e-11eb-95a7-716d70a44a15.png) 3. However, `user1` can assign other reviewers (such as `cipherboy-user2`) just fine. ![Screenshot from 2020-11-01 10-38-39](https://user-images.githubusercontent.com/914030/97807389-6dbb5900-1c2e-11eb-9014-16fe2288afad.png) --- Note: I believe both 1 and 2 to be the same issue just in different permission models (user's repo vs org's repos). Its just that my single user repo had only two people added, whereas the org had three people. If another user is added to the repo, `cipherboy-user2` can assign `cipherboy-user3` to review `user1`'s PR. ## Screenshots Provided above, inline.
GiteaMirror added the type/enhancement label 2025-11-02 06:49:18 -06:00
Author
Owner

@CirnoT commented on GitHub (Nov 1, 2020):

but I can't assign myself as a reviewer on another user's PR. I can only assign other people (user3) as reviewers.

Assigning reviewer sends notification and requests review from specified user; doing it for yourself is illogical in my opinion, if you wish to leave review just leave it and you'll be added as reviewer automatically.

@CirnoT commented on GitHub (Nov 1, 2020): > but I can't assign myself as a reviewer on another user's PR. I can only assign other people (user3) as reviewers. Assigning reviewer sends notification and requests review from specified user; doing it for yourself is illogical in my opinion, if you wish to leave review just leave it and you'll be added as reviewer automatically.
Author
Owner

@cipherboy commented on GitHub (Nov 1, 2020):

@CirnoT -- I disagree. It is really helpful when maintaining projects. GitHub shows all of your active review requests here: https://github.com/pulls/review-requested -- when triaging incoming PRs/... you can assign yourself as a reviewer so you can come back to them later.

One of the projects I've contributed to, the maintainer ultimately merging the PR was the final assignee, whereas reviewers were requested using the reviewers request field.

@cipherboy commented on GitHub (Nov 1, 2020): @CirnoT -- I disagree. It is really helpful when maintaining projects. GitHub shows all of your active review requests here: https://github.com/pulls/review-requested -- when triaging incoming PRs/... you can assign yourself as a reviewer so you can come back to them later. One of the projects I've contributed to, the maintainer ultimately merging the PR was the final assignee, whereas reviewers were requested using the reviewers request field.
Author
Owner

@MGChecker commented on GitHub (Nov 2, 2020):

I just wanted to create this issue myself. I would like to use this feature to mark for myself and for other users that I am planning on reviewing this PR at a later time in my project.

I do not think there could be any harm from allowing this.

@MGChecker commented on GitHub (Nov 2, 2020): I just wanted to create this issue myself. I would like to use this feature to mark for myself and for other users that I am planning on reviewing this PR at a later time in my project. I do not think there could be any harm from allowing this.
Author
Owner

@a1012112796 commented on GitHub (Nov 2, 2020):

Hmm, I think it's ok to allow a self review request. Just skipping notification is enough. but sadly gitea does not have filter option about review and review-request in search pull request list like gh.so I wonder whether it is useful.

@a1012112796 commented on GitHub (Nov 2, 2020): Hmm, I think it's ok to allow a self review request. Just skipping notification is enough. but sadly gitea does not have filter option about review and review-request in search pull request list like gh.so I wonder whether it is useful.
Author
Owner

@6543 commented on GitHub (Nov 22, 2023):

I think this issue can be closed as you can request yourselve on other pulls ...

@6543 commented on GitHub (Nov 22, 2023): I think this issue can be closed as you can request yourselve on other pulls ...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6233