Merge pull request #148 from coreos-inc/squashwarn
Add better messaging around squashed fetching when the user is not a namespace admin
This commit is contained in:
commit
4fb1875dbe
2 changed files with 12 additions and 3 deletions
|
@ -42,7 +42,15 @@
|
|||
allowed-entities="['robot']"
|
||||
clear-value="clearCounter"
|
||||
auto-clear="false"
|
||||
current-entity="currentEntity"></div>
|
||||
current-entity="currentEntity"
|
||||
ng-show="currentFormat.has_creds"></div>
|
||||
|
||||
<div class="co-alert co-alert-warning" ng-show="!currentFormat.has_creds"
|
||||
style="margin-top: 4px; margin-bottom: 0px">
|
||||
Fetching a {{ currentFormat.title }} requires a robot account. You must therefore
|
||||
have admin access on namespace <strong>{{ repository.namespace }}</strong> to setup
|
||||
this fetch.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -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