Skip to content

Commit 27bd9a8

Browse files
committed
Auto merge of #1759 - smarnach:manage-owners-yanked, r=carols10cents
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)
2 parents 6b63a1c + 234a9ac commit 27bd9a8

File tree

3 files changed

+246
-206
lines changed

3 files changed

+246
-206
lines changed

app/controllers/crate/version.js

+5
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ export default Controller.extend({
3232
isOwner: computed('crate.owner_user', 'session.currentUser.id', function() {
3333
return this.get('crate.owner_user').findBy('id', this.get('session.currentUser.id'));
3434
}),
35+
notYankedOrIsOwner: computed('model', 'crate.owner_user', 'session.currentUser.id', function() {
36+
return (
37+
!this.get('model').yanked || this.get('crate.owner_user').findBy('id', this.get('session.currentUser.id'))
38+
);
39+
}),
3540

3641
sortedVersions: readOnly('crate.versions'),
3742

0 commit comments

Comments
 (0)