Skip to content

Commit 90d2405

Browse files
committed
components/version-list/row: Show yank button for admins too
1 parent 48f4705 commit 90d2405

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/components/version-list/row.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
{{/if}}
108108
</div>
109109

110-
{{#if this.isOwner}}
110+
{{#if this.canYank}}
111111
<YankButton @version={{@version}} local-class="yank-button" />
112112
{{/if}}
113113
</div>

app/components/version-list/row.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ export default class VersionRow extends Component {
5151
return this.args.version.crate?.owner_user?.findBy('id', this.session.currentUser?.id);
5252
}
5353

54+
get canYank() {
55+
return this.isOwner || this.session.currentUser?.is_admin;
56+
}
57+
5458
@action setFocused(value) {
5559
this.focused = value;
5660
}

0 commit comments

Comments
 (0)