Show a please sign in message instead of redirecting on the new repo page

This commit is contained in:
Joseph Schorr 2013-10-30 15:44:01 -04:00
parent ab2385d909
commit 6a4341e2cf
2 changed files with 11 additions and 11 deletions

View file

@ -928,6 +928,10 @@ function V1Ctrl($scope, $location, UserService) {
}
function NewRepoCtrl($scope, $location, $http, UserService, Restangular, PlanService) {
$scope.$watch( function () { return UserService.currentUser(); }, function (currentUser) {
$scope.user = currentUser;
}, true);
$scope.repo = {
'is_public': 1,
'description': '',
@ -1016,14 +1020,6 @@ function NewRepoCtrl($scope, $location, $http, UserService, Restangular, PlanSer
}
};
$scope.$watch( function () { return UserService.currentUser(); }, function (currentUser) {
$scope.user = currentUser;
if ($scope.user.anonymous) {
$location.path('/signin/');
}
}, true);
$scope.editDescription = function() {
if (!$scope.markdownDescriptionEditor) {
var converter = Markdown.getSanitizingConverter();