Merge pull request #2076 from coreos-inc/superuser-prod-fix
Remove setup and superuser routes when SUPER_USERS is not enabled
This commit is contained in:
commit
c953fc6539
3 changed files with 12 additions and 10 deletions
|
@ -109,6 +109,14 @@ quayApp.config(['$routeProvider', '$locationProvider', 'pages', function($routeP
|
||||||
{id: 'layout', templatePath: '/static/partials/'}
|
{id: 'layout', templatePath: '/static/partials/'}
|
||||||
], layoutProfile);
|
], layoutProfile);
|
||||||
|
|
||||||
|
if (window.__features.SUPER_USERS) {
|
||||||
|
// QE Management
|
||||||
|
routeBuilder.route('/superuser/', 'superuser')
|
||||||
|
|
||||||
|
// QE Setup
|
||||||
|
.route('/setup/', 'setup');
|
||||||
|
}
|
||||||
|
|
||||||
routeBuilder
|
routeBuilder
|
||||||
// Repository View
|
// Repository View
|
||||||
.route('/repository/:namespace/:name', 'repo-view')
|
.route('/repository/:namespace/:name', 'repo-view')
|
||||||
|
@ -162,12 +170,6 @@ quayApp.config(['$routeProvider', '$locationProvider', 'pages', function($routeP
|
||||||
// New Repository
|
// New Repository
|
||||||
.route('/new/', 'new-repo')
|
.route('/new/', 'new-repo')
|
||||||
|
|
||||||
// ER Management
|
|
||||||
.route('/superuser/', 'superuser')
|
|
||||||
|
|
||||||
// ER Setup
|
|
||||||
.route('/setup/', 'setup')
|
|
||||||
|
|
||||||
// Plans
|
// Plans
|
||||||
.route('/plans/', 'plans')
|
.route('/plans/', 'plans')
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
function ErrorViewCtrl($scope, ApiService, $routeParams, UserService) {
|
function ErrorViewCtrl($scope, ApiService, $routeParams, UserService) {
|
||||||
$scope.info = window.__error_info;
|
$scope.info = window.__error_info || {};
|
||||||
$scope.code = window.__error_code;
|
$scope.code = window.__error_code || 404;
|
||||||
}
|
}
|
||||||
}());
|
}());
|
|
@ -11,10 +11,10 @@
|
||||||
<h4 ng-if="!info.for_repo && !info.namespace_exists">
|
<h4 ng-if="!info.for_repo && !info.namespace_exists">
|
||||||
Return to the <a href="/">main page</a>
|
Return to the <a href="/">main page</a>
|
||||||
</h4>
|
</h4>
|
||||||
<h4 ng-if="info && !info.namespace_exists">
|
<h4 ng-if="info && !info.namespace_exists && info.namespace">
|
||||||
<a href="/organizations/new?namespace={{ info.namespace }}">Create this namespace</a> or return to the <a href="/">main page</a>
|
<a href="/organizations/new?namespace={{ info.namespace }}">Create this namespace</a> or return to the <a href="/">main page</a>
|
||||||
</h4>
|
</h4>
|
||||||
<h4 ng-if="info && info.for_repo && info.namespace_exists">
|
<h4 ng-if="info && info.for_repo && info.namespace_exists && info.namespace">
|
||||||
<a href="/new?namespace={{ info.namespace }}&name={{ info.repo_name }}">Create this repository</a> or return to the <a href="/">main page</a>
|
<a href="/new?namespace={{ info.namespace }}&name={{ info.repo_name }}">Create this repository</a> or return to the <a href="/">main page</a>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
Reference in a new issue