Add better messaging around squashed fetching when the user is not a namespace admin

Fixed #147
This commit is contained in:
Joseph Schorr 2015-06-17 16:38:19 -04:00
parent ee154c37a8
commit 96bcfa84ae
2 changed files with 12 additions and 3 deletions

View file

@ -24,12 +24,13 @@ angular.module('quay').directive('fetchTagDialog', function () {
var updateFormats = function() {
$scope.formats = [];
if ($scope.repository && UserService.isNamespaceAdmin($scope.repository.namespace)) {
if ($scope.repository) {
$scope.formats.push({
'title': 'Squashed Docker Image',
'icon': 'ci-squashed',
'command': 'curl -L -f {http}://{pull_user}:{pull_password}@{hostname}/c1/squash/{namespace}/{name}/{tag} | docker load',
'require_creds': true
'require_creds': true,
'has_creds': UserService.isNamespaceAdmin($scope.repository.namespace)
});
}