Skip to content

Commit

Permalink
Auto merge of #1759 - smarnach:manage-owners-yanked, r=carols10cents
Browse files Browse the repository at this point in the history
Show right-hand column for yanked versions to crate owners.

Fixes #1660.

Without this change, the page for a yanked version looks like this:

![image](https://user-images.githubusercontent.com/249196/58944345-ec823d00-8781-11e9-9322-019250a6fb1d.png)

With this change applied, crate owners see this page instead:

![image](https://user-images.githubusercontent.com/249196/58944390-0de32900-8782-11e9-9c58-ac649c9c23c0.png)
  • Loading branch information
bors committed Aug 30, 2019
2 parents 6b63a1c + 234a9ac commit 27bd9a8
Show file tree
Hide file tree
Showing 3 changed files with 246 additions and 206 deletions.
5 changes: 5 additions & 0 deletions app/controllers/crate/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ export default Controller.extend({
isOwner: computed('crate.owner_user', 'session.currentUser.id', function() {
return this.get('crate.owner_user').findBy('id', this.get('session.currentUser.id'));
}),
notYankedOrIsOwner: computed('model', 'crate.owner_user', 'session.currentUser.id', function() {
return (
!this.get('model').yanked || this.get('crate.owner_user').findBy('id', this.get('session.currentUser.id'))
);
}),

sortedVersions: readOnly('crate.versions'),

Expand Down
Loading

0 comments on commit 27bd9a8

Please sign in to comment.