diff --git a/routers/api/v1/activitypub/repository.go b/routers/api/v1/activitypub/repository.go index b2f17a184e..1f2599f0de 100644 --- a/routers/api/v1/activitypub/repository.go +++ b/routers/api/v1/activitypub/repository.go @@ -7,7 +7,6 @@ import ( "net/http" "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/log" ) // Repository function returns the Repository actor for a repo @@ -27,7 +26,6 @@ func Repository(ctx *context.APIContext) { // "200": // "$ref": "#/responses/ActivityPub" - log.Error("Repository") ctx.Status(http.StatusNoContent) } diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index ce4e040854..c3f6c679e3 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -895,7 +895,7 @@ func Routes() *web.Route { m.Post("/inbox", activitypub.ReqHTTPSignature(), activitypub.PersonInbox) }, context_service.UserIDAssignmentAPI()) // TODO: implement ctx - m.Group("/repository-id/{repsitory-id}", func() { + m.Group("/repository-id/{repository-id}", func() { m.Get("", activitypub.Repository) m.Post("/inbox", activitypub.ReqHTTPSignature(), activitypub.RepositoryInbox) }, context_service.RepositoryIDAssignmentAPI()) diff --git a/services/context/repository.go b/services/context/repository.go index 0270689cab..0ce00cca6d 100644 --- a/services/context/repository.go +++ b/services/context/repository.go @@ -20,10 +20,10 @@ func RepositoryIDAssignmentAPI() func(ctx *context.APIContext) { log.Info("RepositoryIDAssignmentAPI: %v", repositoryID) //TODO: check auth here ? - if !ctx.Repo.HasAccess() && !ctx.IsUserSiteAdmin() { - ctx.Error(http.StatusForbidden, "reqAnyRepoReader", "user should have any permission to read repository or permissions of site admin") - return - } + //if !ctx.Repo.HasAccess() && !ctx.IsUserSiteAdmin() { + // ctx.Error(http.StatusForbidden, "reqAnyRepoReader", "user should have any permission to read repository or permissions of site admin") + // return + //} var err error repository := new(context.Repository)