diff --git a/routers/api/v1/activitypub/repository.go b/routers/api/v1/activitypub/repository.go index 1f2599f0de..b2f17a184e 100644 --- a/routers/api/v1/activitypub/repository.go +++ b/routers/api/v1/activitypub/repository.go @@ -7,6 +7,7 @@ import ( "net/http" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" ) // Repository function returns the Repository actor for a repo @@ -26,6 +27,7 @@ func Repository(ctx *context.APIContext) { // "200": // "$ref": "#/responses/ActivityPub" + log.Error("Repository") ctx.Status(http.StatusNoContent) } diff --git a/services/context/repository.go b/services/context/repository.go index b886e7e0df..0270689cab 100644 --- a/services/context/repository.go +++ b/services/context/repository.go @@ -8,6 +8,7 @@ import ( repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" ) // RepositoryIDAssignmentAPI returns a middleware to handle context-repo assignment for api routes @@ -16,6 +17,8 @@ func RepositoryIDAssignmentAPI() func(ctx *context.APIContext) { // TODO: enough validation for security? repositoryID := ctx.ParamsInt64(":repository-id") + 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")