Have the fetch tag dialog show a warning for robot accounts without access

Before this change, we'd show the squash pulling command with the proper credentials, but it then 403s on the end user.
This commit is contained in:
Joseph Schorr 2015-07-01 11:39:12 +03:00 committed by Joseph Schorr
parent 7aeaf2344e
commit b535e222b8
5 changed files with 108 additions and 2 deletions

View file

@ -56,6 +56,13 @@
</table>
<div class="cor-loader-inline" ng-if="currentEntity && !currentRobot"></div>
<div class="co-alert co-alert-warning"
ng-if="currentRobotHasPermission === false">
Warning: Robot account <strong>{{ currentRobot.name }}</strong> does not have
read permission on this repository, so the command below will fail with an authorization error.
</div>
<div ng-if="getCommand(currentFormat, currentRobot)">
Command:
<pre class="command">{{ getCommand(currentFormat, currentRobot) }}</pre>