Merge ~newell-jensen/maas:lp1798242 into maas:master

Proposed by Newell Jensen
Status: Merged
Approved by: Newell Jensen
Approved revision: c0c1a738bb567b861dbd8de9c635937064d12694
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~newell-jensen/maas:lp1798242
Merge into: maas:master
Diff against target: 22 lines (+2/-2)
1 file modified
src/maasserver/static/partials/boot-images.html (+2/-2)
Reviewer Review Type Date Requested Status
Lee Trager (community) Approve
MAAS Lander unittests Pending
Review via email: mp+358270@code.launchpad.net

Commit message

LP: #1798242 -- Only show the 'Remove image' button in the Images tab if the user is an admin.

To post a comment you must log in.
Revision history for this message
Lee Trager (ltrager) wrote :

LGTM!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/maasserver/static/partials/boot-images.html b/src/maasserver/static/partials/boot-images.html
2index 7c81c67..e986015 100644
3--- a/src/maasserver/static/partials/boot-images.html
4+++ b/src/maasserver/static/partials/boot-images.html
5@@ -328,7 +328,7 @@
6 <td aria-label="Size" class="p-table__cell">{$ image.size $}</td>
7 <td aria-label="Status" class="p-table__cell">{$ image.status $}</td>
8 <td class="p-table__cell u-align--right">
9- <button class="p-button--negative" aria-label="Remove" data-ng-click="quickRemove(image)">Remove image</button>
10+ <button class="p-button--negative" aria-label="Remove" data-ng-if="isSuperUser()" data-ng-click="quickRemove(image)">Remove image</button>
11 </td>
12 <td class="p-table-expanding__panel col-12" data-ng-if="isShowingDeleteConfirm(image)">
13 <h2 data-ng-click="cancelRemove()" class="u-float--left p-heading--four">Remove image</h2>
14@@ -371,7 +371,7 @@
15 <td aria-label="Size" class="p-table__cell">{$ image.size $}</td>
16 <td aria-label="Status" class="p-table__cell">{$ image.status $}</td>
17 <td class="p-table__cell u-align--right">
18- <a aria-label="Remove" data-ng-click="toggleMenu(); quickRemove(image)">Remove image</a>
19+ <a aria-label="Remove" data-ng-if="isSuperUser()" data-ng-click="toggleMenu(); quickRemove(image)">Remove image</a>
20 </td>
21 <td class="p-table-expanding__panel col-12" data-ng-if="isShowingDeleteConfirm(image)">
22 <h2 class="p-heading--four" data-ng-click="cancelRemove()">Remove image</h2>

Subscribers

People subscribed via source and target branches