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 new
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:

The removed user should not appear in the branch permission anymore. Once a user is removed from a team, their permissions should be removed as well.

Actual Result

The removed user still appears in the branch permission -- At the same time, 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 (8)

  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. Log in to comment