Minimize the queries used when retrieve builds. Previously, we'd call out to SQL extra times per build.

This commit is contained in:
Joseph Schorr 2015-05-07 21:11:15 -04:00
parent e99ae67e58
commit 3627de103c
5 changed files with 34 additions and 17 deletions

View file

@ -197,9 +197,9 @@ angular.module('quay').directive('repoPanelBuilds', function () {
};
$scope.askRunTrigger = function(trigger) {
if ($scope.user.username != trigger.connected_user) {
bootbox.alert('For security reasons, only user "' + trigger.connected_user +
'" can manually invoke this trigger');
if (!trigger.is_connected_user) {
bootbox.alert('For security reasons, only the user that created this trigger can ' +
'manually invoke this trigger');
return;
}