ability to visit public repos when not authenticated

This commit is contained in:
Brad Rydzewski 2015-04-29 16:08:21 -07:00
parent ca931cd9eb
commit 7a75a17535
3 changed files with 8 additions and 7 deletions

View file

@ -210,12 +210,11 @@ func PostRepo(c *gin.Context) {
// activate the repository before we make any // activate the repository before we make any
// local changes to the database. // local changes to the database.
// err = remote.Activate(user, r, keypair, link) err = remote.Activate(user, r, keypair, link)
// if err != nil { if err != nil {
// c.Fail(500, err) c.Fail(500, err)
// return return
// } }
println(link)
// persist the repository // persist the repository
err = store.SetRepoNotExists(user, r) err = store.SetRepoNotExists(user, r)

View file

@ -105,7 +105,7 @@
$httpProvider.interceptors.push(function($q, $location) { $httpProvider.interceptors.push(function($q, $location) {
return { return {
'responseError': function(rejection) { 'responseError': function(rejection) {
if (rejection.status === 401) {// && rejection.config.url != "/api/user") { if (rejection.status === 401 && rejection.config.url !== "/api/user") {
$location.path('/login'); $location.path('/login');
} }
if (rejection.status === 0) { if (rejection.status === 0) {

View file

@ -74,6 +74,8 @@
this.getCurrent().then(function(payload){ this.getCurrent().then(function(payload){
_user=payload; _user=payload;
defer.resolve(_user); defer.resolve(_user);
}).catch(function(){
defer.resolve(_user);
}); });
return defer.promise; return defer.promise;