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
|
||||
// local changes to the database.
|
||||
// err = remote.Activate(user, r, keypair, link)
|
||||
// if err != nil {
|
||||
// c.Fail(500, err)
|
||||
// return
|
||||
// }
|
||||
println(link)
|
||||
err = remote.Activate(user, r, keypair, link)
|
||||
if err != nil {
|
||||
c.Fail(500, err)
|
||||
return
|
||||
}
|
||||
|
||||
// persist the repository
|
||||
err = store.SetRepoNotExists(user, r)
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
$httpProvider.interceptors.push(function($q, $location) {
|
||||
return {
|
||||
'responseError': function(rejection) {
|
||||
if (rejection.status === 401) {// && rejection.config.url != "/api/user") {
|
||||
if (rejection.status === 401 && rejection.config.url !== "/api/user") {
|
||||
$location.path('/login');
|
||||
}
|
||||
if (rejection.status === 0) {
|
||||
|
|
|
@ -74,6 +74,8 @@
|
|||
this.getCurrent().then(function(payload){
|
||||
_user=payload;
|
||||
defer.resolve(_user);
|
||||
}).catch(function(){
|
||||
defer.resolve(_user);
|
||||
});
|
||||
|
||||
return defer.promise;
|
||||
|
|
Loading…
Reference in a new issue