Editing Branch Permission on a repo is broken if the particular branch permission contains a user who does not have any permissions to the repo anymore

Issue #13800 open
Vivian Choo
staff created an issue

Steps to Reproduce:

  1. Add a user as a group member in a team account -- make sure the user has at least write access to repos
  2. Add a branch permission to a repo, and add the user into the branch permission
  3. Remove the user from the team

Expected Result:

It should still be possible to edit the branch permission.

Actual Result

Trying to edit the branch permission will end up with an error message 'Unexpected error has occured'

Screen Shot 2017-02-02 at 10.54.17 PM.png

Workaround Re-add the affected Branch Permission

Comments (12)

  1. Daniel Tao staff

    I'm changing this bug to an enhancement because:

    1. I'm not sure that removing users from branch permissions when they lose access to the repository is something we want to do. It might be, but their inclusion in the branch permission shouldn't break anything (i.e. branch permissions do not override repo access privileges); and with our current behavior if you mistakenly remove a user from your team, only to add them back a moment later, they won't have lost all of their branch permissions.
    2. I agree that the error message that displays when you attempt to edit the branch permission is not helpful. We should improve that, but that will be an improvement to the UI as opposed to a bugfix.
  2. Daniel Tao staff

    Apologies for any confusion from my comment earlier this year. I believe I failed to read the entire issue description initially. There are actually two expectations being expressed here:

    1. That users should automatically be removed from branch permissions when they are removed from a team. This is the expectation I was responding to in my earlier comment, which I still believe is not a bug but rather an enhancement.
    2. That it should be possible to edit branch permissions that contain users who have since been removed from the team. This is absolutely true: if it isn't working, then it's a bug.

    What I will do now, to avoid dunces like myself from being confused in the future, is create a separate issue (and mark as enhancement) for the first item in the list above and update the description of this issue to only capture the second item.

  3. Log in to comment