Add better messaging around squashed fetching when the user is not a namespace admin
Fixed #147
This commit is contained in:
parent
ee154c37a8
commit
96bcfa84ae
2 changed files with 12 additions and 3 deletions
|
@ -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)
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue