mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-27 04:11:03 +00:00
ability to visit public repos when not authenticated
This commit is contained in:
parent
ca931cd9eb
commit
7a75a17535
3 changed files with 8 additions and 7 deletions
|
@ -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)
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue