summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/attachment.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/attachment.go')
-rw-r--r--routers/web/repo/attachment.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/web/repo/attachment.go b/routers/web/repo/attachment.go
index 303eee24d1..4101d81ac5 100644
--- a/routers/web/repo/attachment.go
+++ b/routers/web/repo/attachment.go
@@ -100,12 +100,12 @@ func GetAttachment(ctx *context.Context) {
return
}
- if repository == nil { //If not linked
- if !(ctx.IsSigned && attach.UploaderID == ctx.User.ID) { //We block if not the uploader
+ if repository == nil { // If not linked
+ if !(ctx.IsSigned && attach.UploaderID == ctx.User.ID) { // We block if not the uploader
ctx.Error(http.StatusNotFound)
return
}
- } else { //If we have the repository we check access
+ } else { // If we have the repository we check access
perm, err := models.GetUserRepoPermission(repository, ctx.User)
if err != nil {
ctx.Error(http.StatusInternalServerError, "GetUserRepoPermission", err.Error())
@@ -123,7 +123,7 @@ func GetAttachment(ctx *context.Context) {
}
if setting.Attachment.ServeDirect {
- //If we have a signed url (S3, object storage), redirect to this directly.
+ // If we have a signed url (S3, object storage), redirect to this directly.
u, err := storage.Attachments.URL(attach.RelativePath(), attach.Name)
if u != nil && err == nil {
@@ -136,7 +136,7 @@ func GetAttachment(ctx *context.Context) {
return
}
- //If we have matched and access to release or issue
+ // If we have matched and access to release or issue
fr, err := storage.Attachments.Open(attach.RelativePath())
if err != nil {
ctx.ServerError("Open", err)