Hide Run button on triggers not created by the current user

Fixes #726
This commit is contained in:
Joseph Schorr 2015-10-27 12:52:57 -04:00
parent fb97f6c84b
commit 4f06c40c9d
2 changed files with 13 additions and 1 deletions

View file

@ -11,3 +11,12 @@
width: 100%;
}
.dockerfile-build-dialog-element .trigger-list td {
padding-bottom: 10px;
}
.dockerfile-build-dialog-element .trigger-list td .empty {
color: #ccc;
font-size: 12px;
}

View file

@ -39,7 +39,10 @@
<table class="trigger-list">
<tr ng-repeat="trigger in triggers">
<td><span class="trigger-description" trigger="trigger"></span></td>
<td><button class="btn btn-primary" ng-click="runTriggerNow(trigger)">Run Trigger</button></td>
<td>
<button class="btn btn-primary" ng-click="runTriggerNow(trigger)" ng-if="trigger.is_connected_user">Run Trigger</button>
<span class="empty" ng-if="!trigger.is_connected_user">You cannot start triggers created by another user</span>
</td>
</tr>
</table>
</div>