Skip to content

Improve visibility of PR controls to take into account user write permission#1433

Merged
RMacfarlane merged 2 commits intomicrosoft:masterfrom
IllusionMH:edit-controls-visibility
Nov 1, 2019
Merged

Improve visibility of PR controls to take into account user write permission#1433
RMacfarlane merged 2 commits intomicrosoft:masterfrom
IllusionMH:edit-controls-visibility

Conversation

@IllusionMH
Copy link
Contributor

Fixes #1408
Added checks if current user has write permission to repo to elements that are only available to collaborators.

Fixes #1065
Extended definition/calculation of canEdit to specify that PR author and collaborator(current user) has edit access to PR description/title.

Edit access on separate comments is already controlled by viewerCanEdit flag on each comment.
Editing review summary comment is not implemented at this moment and out of scope of this PR.

Copy link
Contributor

@RMacfarlane RMacfarlane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @IllusionMH! Looks good!

@RMacfarlane RMacfarlane merged commit b857885 into microsoft:master Nov 1, 2019
@IllusionMH IllusionMH deleted the edit-controls-visibility branch November 1, 2019 21:43
@IllusionMH
Copy link
Contributor Author

Thanks for quick review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display add/remove controls for reviewers and labels only to users with write access edit title and description of others' PRs when allowed

2 participants