Compare commits

...

17 Commits

Author SHA1 Message Date
kolaente
c934124b88 fix: release bucket name
(cherry picked from commit af11a6527f)
2024-12-22 21:24:18 +01:00
kolaente
b7bba814e3 chore: release preperations 2024-12-22 20:02:08 +01:00
kolaente
8c285968af chore: do not generate config yaml 2024-12-22 20:00:44 +01:00
kolaente
b91a5d9adf chore: sign drone config 2024-12-22 19:54:02 +01:00
kolaente
17b281072f chore: release preparation 2024-12-22 19:52:12 +01:00
kolaente
d47555e3c2 fix(export): update only current user export file id 2024-12-22 19:49:39 +01:00
kolaente
3f98f47256 feat: use hetzner object storage for releases
(cherry picked from commit 0472acac98)
2024-11-21 16:58:44 +01:00
kolaente
00a4d63344 chore: 0.24.5 release preperation 2024-11-21 16:20:40 +01:00
kolaente
82f37df16d fix(ci): do not build linux 368 docker images
Related to 6fe22aba39

(cherry picked from commit da0e110ee4)
2024-11-21 16:20:18 +01:00
kolaente
dfd3e276ab chore: go mod tidy 2024-11-21 16:05:36 +01:00
kolaente
3a0a3b49af chore: sign drone config 2024-11-21 16:05:36 +01:00
kolaente
6d7f81fa7e fix!: disable 368 releases
We can either support arm64 or 368 release binaries - because the arm64 binaries are probably wider used today, we'll prioritize that. It is still possible to compile Vikunja from source on a 368 system, but would take quite a bit of effort in providing pre-built binaries.
Please reach out if you need assistance for 368 binaries.

See https://github.com/techknowlogick/xgo/issues/256#issuecomment-2462135108

(cherry picked from commit 6fe22aba39)
2024-11-21 16:05:36 +01:00
kolaente
154e3e4587 fix: upgrade xgo docker image everywhere
(cherry picked from commit d6194b8f10)
2024-11-21 16:05:36 +01:00
kolaente
372363d254 fix: upgrade xgo
(cherry picked from commit f826fb9a91)
2024-11-21 16:05:36 +01:00
kolaente
61e6990ab3 fix: pin xgo to 1.22.x
Hopefully resolves build issues like https://drone.kolaente.de/vikunja/vikunja/8996/3/10

(cherry picked from commit de1eac5d36)
2024-11-21 16:05:36 +01:00
kolaente
714298a94e fix(attachments): check permissions when accessing all attachments
(cherry picked from commit 3659b7b58d)
2024-11-21 15:44:30 +01:00
kolaente
a0d05211ff fix(saved filters): check permissions when accessing tasks of a filter
(cherry picked from commit bbbd936868)
2024-11-21 15:44:30 +01:00
10 changed files with 155 additions and 90 deletions

View File

@@ -580,7 +580,7 @@ steps:
event: [ push, tag, pull_request ]
- name: before-static-build
image: techknowlogick/xgo:latest
image: ghcr.io/techknowlogick/xgo:go-1.23.x
pull: always
commands:
- export PATH=$PATH:$GOPATH/bin
@@ -589,7 +589,7 @@ steps:
depends_on: [ fetch-tags, mage ]
- name: static-build-windows
image: techknowlogick/xgo:latest
image: ghcr.io/techknowlogick/xgo:go-1.23.x
pull: always
environment:
# This path does not exist. However, when we set the gopath to /go, the build fails. Not sure why.
@@ -605,7 +605,7 @@ steps:
- frontend-build
- name: static-build-linux
image: techknowlogick/xgo:latest
image: ghcr.io/techknowlogick/xgo:go-1.23.x
pull: always
environment:
# This path does not exist. However, when we set the gopath to /go, the build fails. Not sure why.
@@ -621,7 +621,7 @@ steps:
- frontend-build
- name: static-build-darwin
image: techknowlogick/xgo:latest
image: ghcr.io/techknowlogick/xgo:go-1.23.x
pull: always
environment:
# This path does not exist. However, when we set the gopath to /go, the build fails. Not sure why.
@@ -647,7 +647,7 @@ steps:
- ./mage-static release:compress
- name: after-build-static
image: techknowlogick/xgo:latest
image: ghcr.io/techknowlogick/xgo:go-1.23.x
pull: always
depends_on:
- after-build-compress
@@ -676,13 +676,13 @@ steps:
image: plugins/s3
pull: always
settings:
bucket: vikunja-releases
bucket: vikunja
access_key:
from_secret: aws_access_key_id
from_secret: hetzner_access_key_id
secret_key:
from_secret: aws_secret_access_key
endpoint: https://s3.fr-par.scw.cloud
region: fr-par
from_secret: hetzner_secret_access_key
endpoint: https://fsn1.your-objectstorage.com
region: fsn1
path_style: true
strip_prefix: dist/zip/
source: dist/zip/*
@@ -698,13 +698,13 @@ steps:
image: plugins/s3
pull: always
settings:
bucket: vikunja-releases
bucket: vikunja
access_key:
from_secret: aws_access_key_id
from_secret: hetzner_access_key_id
secret_key:
from_secret: aws_secret_access_key
endpoint: https://s3.fr-par.scw.cloud
region: fr-par
from_secret: hetzner_secret_access_key
endpoint: https://fsn1.your-objectstorage.com
region: fsn1
path_style: true
strip_prefix: dist/zip/
source: dist/zip/*
@@ -750,13 +750,13 @@ steps:
image: plugins/s3
pull: always
settings:
bucket: vikunja-releases
bucket: vikunja
access_key:
from_secret: aws_access_key_id
from_secret: hetzner_access_key_id
secret_key:
from_secret: aws_secret_access_key
endpoint: https://s3.fr-par.scw.cloud
region: fr-par
from_secret: hetzner_secret_access_key
endpoint: https://fsn1.your-objectstorage.com
region: fsn1
path_style: true
strip_prefix: dist/os-packages/
source: dist/os-packages/*
@@ -772,13 +772,13 @@ steps:
image: plugins/s3
pull: always
settings:
bucket: vikunja-releases
bucket: vikunja
access_key:
from_secret: aws_access_key_id
from_secret: hetzner_access_key_id
secret_key:
from_secret: aws_secret_access_key
endpoint: https://s3.fr-par.scw.cloud
region: fr-par
from_secret: hetzner_secret_access_key
endpoint: https://fsn1.your-objectstorage.com
region: fsn1
path_style: true
strip_prefix: dist/os-packages/
source: dist/os-packages/*
@@ -837,7 +837,6 @@ steps:
repo: vikunja/vikunja
tags: unstable
platforms:
- linux/386
- linux/amd64
- linux/arm/v6
- linux/arm/v7
@@ -869,7 +868,6 @@ steps:
from_secret: docker_password
repo: vikunja/vikunja
platforms:
- linux/386
- linux/amd64
- linux/arm/v6
- linux/arm/v7
@@ -931,13 +929,13 @@ steps:
image: plugins/s3
pull: always
settings:
bucket: vikunja-releases
bucket: vikunja
access_key:
from_secret: aws_access_key_id
from_secret: hetzner_access_key_id
secret_key:
from_secret: aws_secret_access_key
endpoint: https://s3.fr-par.scw.cloud
region: fr-par
from_secret: hetzner_secret_access_key
endpoint: https://fsn1.your-objectstorage.com
region: fsn1
path_style: true
source: frontend/vikunja-frontend-unstable.zip
target: /
@@ -990,13 +988,13 @@ steps:
image: plugins/s3
pull: always
settings:
bucket: vikunja-releases
bucket: vikunja
access_key:
from_secret: aws_access_key_id
from_secret: hetzner_access_key_id
secret_key:
from_secret: aws_secret_access_key
endpoint: https://s3.fr-par.scw.cloud
region: fr-par
from_secret: hetzner_secret_access_key
endpoint: https://fsn1.your-objectstorage.com
region: fsn1
path_style: true
source: frontend/vikunja-frontend-${DRONE_TAG##v}.zip
target: /
@@ -1095,8 +1093,8 @@ steps:
# settings:
# restore: true
# bucket: kolaente.dev-drone-dependency-cache
# endpoint: https://s3.fr-par.scw.cloud
# region: fr-par
# endpoint: https://fsn1.your-objectstorage.com
# region: fsn1
# path_style: true
# cache_key: '{{ .Repo.Name }}_{{ checksum "desktop/yarn.lock" }}_{{ arch }}_{{ os }}'
# mount:
@@ -1133,8 +1131,8 @@ steps:
# settings:
# rebuild: true
# bucket: kolaente.dev-drone-dependency-cache
# endpoint: https://s3.fr-par.scw.cloud
# region: fr-par
# endpoint: https://fsn1.your-objectstorage.com
# region: fsn1
# path_style: true
# cache_key: '{{ .Repo.Name }}_{{ checksum "desktop/yarn.lock" }}_{{ arch }}_{{ os }}'
# mount:
@@ -1176,8 +1174,8 @@ steps:
# settings:
# restore: true
# bucket: kolaente.dev-drone-dependency-cache
# endpoint: https://s3.fr-par.scw.cloud
# region: fr-par
# endpoint: https://fsn1.your-objectstorage.com
# region: fsn1
# path_style: true
# cache_key: '{{ .Repo.Name }}_{{ checksum "desktop/yarn.lock" }}_{{ arch }}_{{ os }}'
# mount:
@@ -1200,30 +1198,30 @@ steps:
- unzip vikunja-frontend-$$VERSION.zip -d frontend
- sed -i 's/\\/api\\/v1//g' frontend/index.html
- ./bumpp.sh
- yarn install
- cat package.json
- yarn dist --linux --windows
# - name: rebuild-cache
# image: meltwater/drone-cache:dev
# pull: true
# environment:
# AWS_ACCESS_KEY_ID:
# from_secret: cache_aws_access_key_id
# AWS_SECRET_ACCESS_KEY:
# from_secret: cache_aws_secret_access_key
# settings:
# rebuild: true
# bucket: kolaente.dev-drone-dependency-cache
# endpoint: https://s3.fr-par.scw.cloud
# region: fr-par
# path_style: true
# cache_key: '{{ .Repo.Name }}_{{ checksum "desktop/yarn.lock" }}_{{ arch }}_{{ os }}'
# mount:
# - '.cache'
# depends_on:
# - build
- corepack enable && pnpm config set store-dir .cache/pnpm
- pnpm install --fetch-timeout 100000
- pnpm dist --linux --windows
# - name: rebuild-cache
# image: meltwater/drone-cache:dev
# pull: true
# environment:
# AWS_ACCESS_KEY_ID:
# from_secret: cache_aws_access_key_id
# AWS_SECRET_ACCESS_KEY:
# from_secret: cache_aws_secret_access_key
# settings:
# rebuild: true
# bucket: kolaente.dev-drone-dependency-cache
# endpoint: https://fsn1.your-objectstorage.com
# region: fsn1
# path_style: true
# cache_key: '{{ .Repo.Name }}_{{ checksum "desktop/yarn.lock" }}_{{ arch }}_{{ os }}'
# mount:
# - '.cache'
# depends_on:
# - build
- name: rename-unstable
image: bash
pull: true
@@ -1241,13 +1239,13 @@ steps:
image: plugins/s3
pull: true
settings:
bucket: vikunja-releases
bucket: vikunja
access_key:
from_secret: aws_access_key_id
from_secret: hetzner_access_key_id
secret_key:
from_secret: aws_secret_access_key
endpoint: https://s3.fr-par.scw.cloud
region: fr-par
from_secret: hetzner_secret_access_key
endpoint: https://fsn1.your-objectstorage.com
region: fsn1
path_style: true
strip_prefix: desktop/dist/
source: desktop/dist/Vikunja-Desktop*
@@ -1263,13 +1261,13 @@ steps:
image: plugins/s3
pull: true
settings:
bucket: vikunja-releases
bucket: vikunja
access_key:
from_secret: aws_access_key_id
from_secret: hetzner_access_key_id
secret_key:
from_secret: aws_secret_access_key
endpoint: https://s3.fr-par.scw.cloud
region: fr-par
from_secret: hetzner_secret_access_key
endpoint: https://fsn1.your-objectstorage.com
region: fsn1
path_style: true
strip_prefix: desktop/dist/
source: desktop/dist/*
@@ -1298,9 +1296,9 @@ steps:
# - name: build
# environment:
# ACCESS_KEY:
# from_secret: aws_access_key_id
# from_secret: hetzner_access_key_id
# SECRET_KEY:
# from_secret: aws_secret_access_key
# from_secret: hetzner_secret_access_key
# commands:
# - git fetch --tags
# - export VERSION=${DRONE_TAG##v}
@@ -1313,9 +1311,9 @@ steps:
# - sed -i '' "s/\$${version}/$$VERSION/g" package.json
# - yarn install
# - yarn dist --mac
# - mc config host add scw-fr-par https://s3.fr-par.scw.cloud $ACCESS_KEY $SECRET_KEY --api S3v4
# - mc cp ./dist/*.dmg scw-fr-par/vikunja-releases/desktop/$VERSION/
# - mc cp ./dist/*.dmg.blockmap scw-fr-par/vikunja-releases/desktop/$VERSION/
# - mc config host add scw-fsn1 https://fsn1.your-objectstorage.com $ACCESS_KEY $SECRET_KEY --api S3v4
# - mc cp ./dist/*.dmg scw-fsn1/vikunja/desktop/$VERSION/
# - mc cp ./dist/*.dmg.blockmap scw-fsn1/vikunja/desktop/$VERSION/
---
kind: pipeline
@@ -1352,6 +1350,6 @@ steps:
- failure
---
kind: signature
hmac: eff6e40dc763fa1395078daaabcbef2aaa74fe0a36818a87e89015dbc4e9dae4
hmac: 02fb3097f3e50facb2579de5c3b94e513b97e535a049a28ddb67f85e494d65b1
...

View File

@@ -7,6 +7,40 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
All releases can be found on https://code.vikunja.io/vikunja/releases.
## [0.24.6] - 2024-12-22
### Bug Fixes
* *(export)* Update only current user export file id
### Features
* Use hetzner object storage for releases ([3f98f47](3f98f47256628ac559a947f6c9541c0bf03001b6))
### Miscellaneous Tasks
* Release preparation ([17b2810](17b281072f095730a0fbb28458d713fa883f43ec))
* Sign drone config ([b91a5d9](b91a5d9adfb7144126f5824224970ad4015dcd6a))
* Do not generate config yaml ([8c28596](8c285968afff7ebd087ce824b52b0a9f28a8ec20))
## [0.24.5] - 2024-11-21
### Bug Fixes
* *(attachments)* Check permissions when accessing all attachments
* *(saved filters)* Check permissions when accessing tasks of a filter
* Pin xgo to 1.22.x ([87b2aac](87b2aaccb8cdcbe1ecb6092951a0bfe224ad7006))
* Upgrade xgo ([19b63c8](19b63c86c51f67614b867c75a58cda1774685edd))
* Upgrade xgo docker image everywhere ([04b40f8](04b40f8a7dcd01a86ddb8b27596073d1e50f9e97))
* *(ci)* Do not build linux 368 docker images
* Disable 368 releases ([73db10f](73db10fb02268e07d29842493df55f4d645ac503))
- **BREAKING**: disable 368 releases
### Miscellaneous Tasks
* Sign drone config ([17c4878](17c487875b5771c0971ee8bf030807171de2dddc))
* Go mod tidy ([9639025](96390257e0911089ae33a9565e8be7fa954c772c))
## [0.24.4] - 2024-09-29
### Bug Fixes

View File

@@ -13,7 +13,7 @@ RUN corepack enable && \
pnpm install && \
pnpm run build
FROM --platform=$BUILDPLATFORM techknowlogick/xgo:go-1.21.x AS apibuilder
FROM --platform=$BUILDPLATFORM ghcr.io/techknowlogick/xgo:go-1.23.x AS apibuilder
RUN go install github.com/magefile/mage@latest && \
mv /go/bin/mage /usr/local/go/bin

View File

@@ -2,7 +2,7 @@
[![Build Status](https://drone.kolaente.de/api/badges/vikunja/vikunjaa/status.svg)](https://drone.kolaente.de/vikunja/vikunja)
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](LICENSE)
[![Install](https://img.shields.io/badge/download-v0.24.4,brightgreen.svg)](https://vikunja.io/docs/installing)
[![Install](https://img.shields.io/badge/download-v0.24.6,brightgreen.svg)](https://vikunja.io/docs/installing)
[![Docker Pulls](https://img.shields.io/docker/pulls/vikunja/vikunja.svg)](https://hub.docker.com/r/vikunja/vikunja/)
[![Swagger Docs](https://img.shields.io/badge/swagger-docs-brightgreen.svg)](https://try.vikunja.io/api/v1/docs)
[![Go Report Card](https://goreportcard.com/badge/kolaente.dev/vikunja/vikunja)](https://goreportcard.com/report/kolaente.dev/vikunja/vikunja)

2
go.mod
View File

@@ -78,7 +78,7 @@ require (
gopkg.in/d4l3k/messagediff.v1 v1.2.1
gopkg.in/yaml.v3 v3.0.1
mvdan.cc/xurls/v2 v2.5.0
src.techknowlogick.com/xgo v1.7.1-0.20240403232151-e01c4fbef884
src.techknowlogick.com/xgo v1.8.1-0.20241105013731-313dedef864f
src.techknowlogick.com/xormigrate v1.7.1
xorm.io/builder v0.3.13
xorm.io/xorm v1.3.9

4
go.sum
View File

@@ -723,8 +723,8 @@ mvdan.cc/xurls/v2 v2.5.0 h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8=
mvdan.cc/xurls/v2 v2.5.0/go.mod h1:yQgaGQ1rFtJUzkmKiHYSSfuQxqfYmd//X6PxvholpeE=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
src.techknowlogick.com/xgo v1.7.1-0.20240403232151-e01c4fbef884 h1:Ttvt8FCpUXfC8r3+LgSPrBUIr/JkHmYQtvmOwEET8qE=
src.techknowlogick.com/xgo v1.7.1-0.20240403232151-e01c4fbef884/go.mod h1:31CE1YKtDOrKTk9PSnjTpe6YbO6W/0LTYZ1VskL09oU=
src.techknowlogick.com/xgo v1.8.1-0.20241105013731-313dedef864f h1:Dy7qQ31o3z4EV+0ISDH1IldkPxzubOAvV7DW+9HnbNg=
src.techknowlogick.com/xgo v1.8.1-0.20241105013731-313dedef864f/go.mod h1:31CE1YKtDOrKTk9PSnjTpe6YbO6W/0LTYZ1VskL09oU=
src.techknowlogick.com/xormigrate v1.7.1 h1:RKGLLUAqJ+zO8iZ7eOc7oLH7f0cs2gfXSZSvBRBHnlY=
src.techknowlogick.com/xormigrate v1.7.1/go.mod h1:YGNBdj8prENlySwIKmfoEXp7ILGjAltyKFXD0qLgD7U=
xorm.io/builder v0.3.11-0.20220531020008-1bd24a7dc978/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE=

View File

@@ -547,7 +547,19 @@ func (Release) Windows() error {
// Builds binaries for linux
func (Release) Linux() error {
return runXgo("linux/*")
targets := []string{
"linux/amd64",
"linux/arm-5",
"linux/arm-6",
"linux/arm-7",
"linux/arm64",
"linux/mips",
"linux/mipsle",
"linux/mips64",
"linux/mips64le",
"linux/riscv64",
}
return runXgo(strings.Join(targets, ","))
}
// Builds binaries for darwin

View File

@@ -36,6 +36,7 @@ import (
"code.vikunja.io/api/pkg/user"
"code.vikunja.io/api/pkg/utils"
"code.vikunja.io/api/pkg/version"
"xorm.io/xorm"
)
@@ -106,7 +107,10 @@ func ExportUserData(s *xorm.Session, u *user.User) (err error) {
// Save the file id with the user
u.ExportFileID = exportFile.ID
_, err = s.Cols("export_file_id").Update(u)
_, err = s.
Where("id = ?", u.ID).
Cols("export_file_id").
Update(u)
if err != nil {
return
}

View File

@@ -132,7 +132,16 @@ func (ta *TaskAttachment) ReadOne(s *xorm.Session, _ web.Auth) (err error) {
// @Failure 404 {object} models.Message "The task does not exist."
// @Failure 500 {object} models.Message "Internal error"
// @Router /tasks/{id}/attachments [get]
func (ta *TaskAttachment) ReadAll(s *xorm.Session, _ web.Auth, _ string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error) {
func (ta *TaskAttachment) ReadAll(s *xorm.Session, a web.Auth, _ string, page int, perPage int) (result interface{}, resultCount int, numberOfTotalItems int64, err error) {
task := Task{ID: ta.TaskID}
canRead, _, err := task.CanRead(s, a)
if err != nil {
return nil, 0, 0, err
}
if !canRead {
return nil, 0, 0, ErrGenericForbidden{}
}
attachments := []*TaskAttachment{}
limit, start := getLimitFromPageIndex(page, perPage)

View File

@@ -233,6 +233,14 @@ func (tf *TaskCollection) ReadAll(s *xorm.Session, a web.Auth, search string, pa
return nil, 0, 0, err
}
canRead, _, err := sf.CanRead(s, a)
if err != nil {
return nil, 0, 0, err
}
if !canRead {
return nil, 0, 0, ErrGenericForbidden{}
}
// By prepending sort options before the saved ones from the filter, we make sure the supplied sort
// options via query take precedence over the rest.