forked from vikunja/vikunja
Compare commits
50 Commits
dc2285bcc9
...
8fddbf43ba
Author | SHA1 | Date |
---|---|---|
kolaente | 8fddbf43ba | |
kolaente | beb4d07cf9 | |
kolaente | 10ded56f66 | |
kolaente | d709db4e18 | |
kolaente | 0c8bed4054 | |
kolaente | 9ddd7f4889 | |
kolaente | 3047ccfd4a | |
kolaente | 7f28865903 | |
renovate | a273d1ae76 | |
kolaente | c9e044b3ad | |
kolaente | 8bf0f8bb57 | |
kolaente | 3ccc6365a6 | |
renovate | 8d10130d4c | |
kolaente | 51314f269d | |
renovate | 9eefb2bea9 | |
renovate | 2e5c91efdf | |
kolaente | dbb0f54732 | |
renovate | 6e639d9ccb | |
renovate | a9a8bd54ee | |
renovate | d3a655c75b | |
renovate | e0dc3807f6 | |
konrad | 4e7510995c | |
renovate | f8300c9e1b | |
renovate | ef3f07b677 | |
renovate | ea66875310 | |
renovate | 850ac0c601 | |
renovate | 8ebb642d55 | |
kolaente | 2a569488d7 | |
kolaente | 49b3ae82e4 | |
kolaente | b71e6f8049 | |
kolaente | fa82c71f8c | |
kolaente | 8f473481ac | |
kolaente | 51cd2830dd | |
kolaente | 430057a404 | |
kolaente | 7ffe9b625e | |
kolaente | d47edac376 | |
kolaente | aed1ad6d96 | |
kolaente | 84bcdbf937 | |
kolaente | 280ac1164b | |
kolaente | b6d7323cdf | |
kolaente | 59796fd490 | |
kolaente | 26e2d0bdde | |
kolaente | 251b877015 | |
renovate | b460fa8c82 | |
kolaente | 77fafd5dc3 | |
kolaente | 3688bbde20 | |
kolaente | c51ee94ad1 | |
kolaente | 8f27e7e619 | |
kolaente | 382a7884be | |
renovate | cd345b62c2 |
|
@ -0,0 +1,6 @@
|
|||
files/
|
||||
Dockerfile
|
||||
docker-manifest.tmpl
|
||||
docker-manifest-unstable.tmpl
|
||||
*.db
|
||||
*.zip
|
16
.drone.yml
16
.drone.yml
|
@ -132,13 +132,14 @@ steps:
|
|||
event: [ push, tag, pull_request ]
|
||||
|
||||
- name: lint
|
||||
image: vikunja/golang-build:latest
|
||||
image: golang:1.17-alpine
|
||||
pull: true
|
||||
environment:
|
||||
GOPROXY: 'https://goproxy.kolaente.de'
|
||||
depends_on: [ build ]
|
||||
commands:
|
||||
- wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.45.2
|
||||
- apk --no-cache add build-base git
|
||||
- wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.47.3
|
||||
- ./mage-static check:all
|
||||
when:
|
||||
event: [ push, tag, pull_request ]
|
||||
|
@ -152,7 +153,7 @@ steps:
|
|||
- unzip vikunja-latest.zip vikunja-unstable-linux-amd64
|
||||
|
||||
- name: test-migration-sqlite
|
||||
image: kolaente/toolbox:latest
|
||||
image: vikunja/golang-build:latest
|
||||
pull: true
|
||||
depends_on: [ test-migration-prepare, build ]
|
||||
environment:
|
||||
|
@ -171,7 +172,7 @@ steps:
|
|||
event: [ push, tag, pull_request ]
|
||||
|
||||
- name: test-migration-mysql
|
||||
image: kolaente/toolbox:latest
|
||||
image: vikunja/golang-build:latest
|
||||
pull: true
|
||||
depends_on: [ test-migration-prepare, build ]
|
||||
environment:
|
||||
|
@ -190,7 +191,7 @@ steps:
|
|||
event: [ push, tag, pull_request ]
|
||||
|
||||
- name: test-migration-psql
|
||||
image: kolaente/toolbox:latest
|
||||
image: vikunja/golang-build:latest
|
||||
pull: true
|
||||
depends_on: [ test-migration-prepare, build ]
|
||||
environment:
|
||||
|
@ -662,6 +663,7 @@ steps:
|
|||
image: docker:git
|
||||
commands:
|
||||
- git fetch --tags
|
||||
|
||||
- name: docker-arm-unstable
|
||||
image: plugins/docker:linux-arm
|
||||
pull: true
|
||||
|
@ -672,6 +674,7 @@ steps:
|
|||
from_secret: docker_password
|
||||
repo: vikunja/api
|
||||
tags: unstable-linux-arm
|
||||
dockerfile: Dockerfile.arm32
|
||||
depends_on: [ fetch-tags ]
|
||||
when:
|
||||
ref:
|
||||
|
@ -688,6 +691,7 @@ steps:
|
|||
repo: vikunja/api
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm
|
||||
dockerfile: Dockerfile.arm32
|
||||
depends_on: [ fetch-tags ]
|
||||
when:
|
||||
ref:
|
||||
|
@ -874,6 +878,6 @@ steps:
|
|||
- failure
|
||||
---
|
||||
kind: signature
|
||||
hmac: 1c4c211e66e4b6eddd2a1c1bad31e5c960d4f67d6033f4d5c4de7896dfae6c30
|
||||
hmac: e72b631f902689777e3263ae9527e5aa47738b9021538f7cb5034f95ac265f07
|
||||
|
||||
...
|
||||
|
|
382
CHANGELOG.md
382
CHANGELOG.md
|
@ -7,6 +7,388 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|||
|
||||
All releases can be found on https://code.vikunja.io/api/releases.
|
||||
|
||||
## [0.19.2] - 2022-08-17
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Don't fail a migration if there is no filter saved ([10ded56](10ded56f6697ef47910ec68d37f26ed47cbe9180))
|
||||
* Don't override saved filters ([beb4d07](beb4d07cf95fc25f7cc5f7471b46bdab49f95fe0))
|
||||
|
||||
## [0.19.1] - 2022-08-17
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Prevent moving a list into a pseudo namespace ([3ccc636](3ccc6365a6892f37ee54b0750a34a61e52f6dba1))
|
||||
* Make sure generating blur hashes for bmp, tiff and webp images works ([8bf0f8b](8bf0f8bb571ddff69a7142be1acaa2e4e0c38e3b))
|
||||
* Add debian-based docker image for arm 32 builds ([c9e044b](c9e044b3ad60d25e9641d22d84571a7db83a26ac))
|
||||
* Only list all users when allowed ([9ddd7f4](9ddd7f48895f508539d591aeebde450a86987024))
|
||||
* Lint ([0c8bed4](0c8bed4054649de8510e5a636d1a14b65d52c402))
|
||||
|
||||
### Dependencies
|
||||
|
||||
* *(deps)* Update golang.org/x/sys digest to 6e608f9 (#1229)
|
||||
* *(deps)* Update golang.org/x/sync digest to 886fb93 (#1221)
|
||||
* *(deps)* Update golang.org/x/sys digest to 8e32c04 (#1230)
|
||||
* *(deps)* Update golang.org/x/term digest to a9ba230 (#1222)
|
||||
* *(deps)* Update module github.com/prometheus/client_golang to v1.13.0
|
||||
* *(deps)* Update module github.com/prometheus/client_golang to v1.13.0 (#1231)
|
||||
* *(deps)* Update golang.org/x/sys digest to 1c4a2a7
|
||||
* *(deps)* Update golang.org/x/oauth2 digest to 128564f (#1220)
|
||||
* *(deps)* Update golang.org/x/image digest to 062f8c9 (#1219)
|
||||
* *(deps)* Update golang.org/x/crypto digest to 630584e (#1218)
|
||||
* *(deps)* Update module github.com/labstack/echo/v4 to v4.8.0 (#1233)
|
||||
* *(deps)* Update golang.org/x/sys digest to fbc7d0a (#1234)
|
||||
* *(deps)* Update module github.com/wneessen/go-mail to v0.2.6 (#1235)
|
||||
* *(deps)* Update module github.com/mattn/go-sqlite3 to v1.14.15 (#1238)
|
||||
|
||||
### Features
|
||||
|
||||
* *(docs)* Add k8s docs* Add openid examples ([dbb0f54](dbb0f5473269fb29c4a484cd233a5b76484c4ca7))
|
||||
* Search by assignee username instead of id ([7f28865](7f28865903740d6dde15ee005323fbdee3072166))
|
||||
* Add migration to change user ids to usernames in saved filters ([3047ccf](3047ccfd4af8fee55d9ebff49138911ab80cb3d2))
|
||||
|
||||
## [0.19.0] - 2022-08-03
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* *(caldav)* Make sure the caldav tokens of non-local accounts are properly checked
|
||||
* *(caldav)* Properly parse durations when returning VTODOs
|
||||
* *(caldav)* Make sure description is parsed correctly when multiline
|
||||
* *(ci)* Sign drone config
|
||||
* *(ci)* Make sure the linter actually runs
|
||||
* *(ci)* Install git in lint step
|
||||
* *(docker)* Switch to debian base image
|
||||
* *(docker)* Use official go image instead of our own to build
|
||||
* *(docs)* Update minimum required go version
|
||||
* *(docs)* Use up-to-date hugo image for building
|
||||
* *(docs)* Don't use cannonify url
|
||||
* *(docs)* Image urls in synology setup explanation
|
||||
* *(docs)* Clarify frontend requirements to use Vikunja
|
||||
* *(dump)* Don't try to save a config file if none was provided and dump vikunja env variables
|
||||
* *(mage)* Handle different types of errors
|
||||
* *(mail)* Don't set a username by default
|
||||
* *(mail)* Don't try to authenticate against the mail server when no credentials are provided
|
||||
* *(mail)* Set server name in tls config so that sending mail works with skipTlsVerify set to false
|
||||
* *(restore)* Properly decode notifications json data
|
||||
* *(restore)* Make sure to reset sequences after importing a dump when using postgres
|
||||
* *(restore)* Use the correct initial migration* Generate swagger docs ([4de8ec5](4de8ec56a62caef22c2061376383de1fe53ca4c3))
|
||||
* Make sure the full task is available in notifications ([c2b6119](c2b6119434e6e806785d2c259c3ca3d25496ec75))
|
||||
* Don't try to load the namespace of a list if it is a shared list ([d7e47a2](d7e47a28d4bb04d4c7c3ed85a263134180da447a))
|
||||
* Correctly load and pass the user when deleting it ([50b65a5](50b65a517da6869dc6a48fec40323e254ba4c032))
|
||||
* Updating a list might remove its background ([cf05de1](cf05de19b317bd99c30de4c6a149a0d8a4ff4f49))
|
||||
* Sorting for saved filters ([57e5d10](57e5d10eee4c45a04e9e1aaeaf41dd44eb8ce788))
|
||||
* Importing trello attachments ([c3e0e64](c3e0e6405a634894a30dbf9c0506d1691ae4d443))
|
||||
* Lint ([0b77625](0b7762590f6a0a82090ef74e9e7e32b37142d343))
|
||||
* Deleting users with no namespaces ([f8a0a7e](f8a0a7e9539a44b2f790a08eb1b03028b56eaac3))
|
||||
* Importing tasks from todoist without a due time set ([fd0d462](fd0d462bf4dd8225c67ba34958e5148f6167d264))
|
||||
* User deletion never happens ([72d3c54](72d3c54efd3dda6ae846a069415688391cb1c9ae))
|
||||
* User deletion reminder emails counting up ([f581885](f581885e65ada15439ec02f1d18d825b03581523))
|
||||
* User not actually deleted ([70e005e](70e005e7ce5cf1dd25ec9ddfde3cfbbd258fadb6))
|
||||
* User deletion schedule ([5c88dfe](5c88dfe88eab442724f22c3b29741e78939deae2))
|
||||
* Friendly name not getting synced on first login from openid ([190a9f2](190a9f2a4c1a59bc68b839c465bb2536532c0e96))
|
||||
* Importing archived lists or namespaces ([8bb3f8d](8bb3f8d37c78dc704ff4316c750e143528151b48))
|
||||
* Lint ([a31086a](a31086a7a9ca7723f61a826bccbea125243478f1))
|
||||
* Microsoft todo migration not importing all tasks ([43f1daf](43f1daf40c388a0aa40f7fd6a8db4c78308d4efd))
|
||||
* Clarify which config file is used on startup ([44aaf0a](44aaf0a4eccebb1d1a25f5563e928bd1bb82d351))
|
||||
* Disabling logging completely now works ([22e3f24](22e3f242a396aa9cf54e9426077816f97a0da36f))
|
||||
* Restoring dumps with no config file saved in them ([8bf2254](8bf2254f4b87446ab0a39080cb0b7d32ccec7c0a))
|
||||
* Validate email address when creating a user via cli ([75f74b4](75f74b429eea7ae3a75cb10def1ca658af35086a))
|
||||
* Checking for error types ([ac6818a](ac6818a4769a162c458553944509fe64357370f9))
|
||||
* Lint ([7fa0865](7fa086518800243385d8cc4696eeea9bf093e5b3))
|
||||
* Return BlurHash in unsplash search results ([6b51fae](6b51fae0931308464038f55b25e81e68d014c49c))
|
||||
* Go mod tidy ([e19ad11](e19ad1184662dc9ac9aa89a44abdffc091e2a1b8))
|
||||
* Decoding images for blurHash generation ([d3bdafb](d3bdafb717b1ad3e2165097ef0b0c2dd47e1502e))
|
||||
* Lint ([de97fcb](de97fcbd121b1d56b74175fd79ef594ef34e71c8))
|
||||
* Broken link (#27) ([96e519e](96e519ea96c9537222d0b455037e11fbe9660c31))
|
||||
* Add more methods to figure out the current binary location ([9845fcc](9845fcc1708431f8f736d36e7e19a1067b0e0e52))
|
||||
* Set derived default values only after reading config from file or env ([f5ebada](f5ebada91351faf1e5602f0260908defaaabd810))
|
||||
* Sort tasks logically and consistent across dbms (#1177) ([e52c45d](e52c45d5aabb74ea7b472e8d5b44491cdd7e9489))
|
||||
* VIKUNJA_SERVICE_JWT_SECRET should be VIKUNJA_SERVICE_JWTSECRET (#1184) ([172a621](172a6214d7c30278017129b950339c78a6ddb7bc))
|
||||
* Add missing migration ([d837f8a](d837f8a6248b5ff2700a4bfc300d7f9d466cb918))
|
||||
* Revert renaming Attachments to Embeds everywhere ([c62e26b](c62e26b6fe9d9f362fcfb1df2d5664d7f6854c31))
|
||||
* Set the correct go version in go.mod ([bc7f6a8](bc7f6a858693b0e61fff7d03b5c2b40b6ae1a55d))
|
||||
* Go mod tidy ([7a30294](7a30294407843693f6c3a7414b3b9d7093359194))
|
||||
* Tests ([d0e09d6](d0e09d69d048e62ee7c5b666c2f56761b03e68e6))
|
||||
* Go mod tidy ([951d74b](951d74b272b1e881faa10095f47b6598bb076273))
|
||||
* Prevent logging openid provider errors twice ([25ffa1b](25ffa1bc2e2f1108f20b0336708d2410bb61c9e1))
|
||||
* Remove credential escaping for postgres connections to allow for passwords with special characters ([230478a](230478aae947c86f4c6f1f251dcb30aeb1293283))
|
||||
* Cycles in tasks array when memory caching was enabled ([f5a4c13](f5a4c136fbca6fc5770476e6de8d81173f007df2))
|
||||
* Add missing error check ([5cc4927](5cc4927b9ef97667bf763772beb36225fdbeded8))
|
||||
* Properly set tls config for mailer ([5743a4a](5743a4afe51de221beeeabe66552ae4d92eed1a6))
|
||||
* Return 9:00 as default time for reminders if none was set ([79b3167](79b31673e2a79eaa124976840e85757d2bebb887))
|
||||
* Reset id sequence when importing a dump from postgres ([0f555b7](0f555b7ec74ad493d2f70a4f4040db333943dc1c))
|
||||
* Add validation for negative repeat after values ([dd46174](dd461746a655d716ef142d96a2bcef5615de3dd9))
|
||||
* Lint ([1feb62c](1feb62cc458e939d46d16d24347557e7959ddfb9))
|
||||
* Make sure to use user discoverability settings when searching list users ([382a788](382a7884be1f37da5c8f657c4b17316d8691dd59))
|
||||
* Properly decode params in url ([8f27e7e](8f27e7e619ac73716211d838f52c73d7d97aead5))
|
||||
* Return all users on a list when no search param was provided ([c51ee94](c51ee94ad1d552d69c71adfc2180c7ad0d23235d))
|
||||
* Don't return email addresses from user search results ([3688bbd](3688bbde20e989397353ea4f7e872b00a53099c2))
|
||||
* Lint ([77fafd5](77fafd5dc32aee464961be40d5d0ccf82490d02a))
|
||||
* Increase test timeout ([26e2d0b](26e2d0bddeaea902dba055baf7a4c866a44ba7f1))
|
||||
* Switch to buster for build image ([59796fd](59796fd4905fca74d26c5541878379cda143a30e))
|
||||
* Use our own build image as base build image ([b6d7323](b6d7323cdfac958c9740feba1342114ab13a0afd))
|
||||
* Use golang build image to test migrations ([84bcdbf](84bcdbf937c3be7823fcf8d5fef52e3cbb1c9bde))
|
||||
* Switch back to alpine for everything, disable arm 32 docker builds ([7ffe9b6](7ffe9b625e441202a704db2774dd66fc38244c6d))
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* *(deps)* Update golang.org/x/sys commit hash to a851e7d (#972)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to aa78b53 (#973)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 528a39c (#974)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 437939a (#975)
|
||||
* *(deps)* Update module github.com/yuin/goldmark to v1.4.1 (#976)
|
||||
* *(deps)* Update module github.com/coreos/go-oidc/v3 to v3.1.0 (#985)
|
||||
* *(deps)* Update module github.com/spf13/viper to v1.9.0 (#987)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to 089bfa5 (#979)
|
||||
* *(deps)* Update golang.org/x/term commit hash to 140adaa (#983)
|
||||
* *(deps)* Update module github.com/labstack/echo/v4 to v4.6.0 (#988)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to b8560ed (#989)
|
||||
* *(deps)* Update module github.com/golang-jwt/jwt/v4 to v4.1.0 (#991)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 92d5a99 (#992)
|
||||
* *(deps)* Update module github.com/swaggo/swag to v1.7.3 (#990)
|
||||
* *(deps)* Update module github.com/labstack/echo/v4 to v4.6.1 (#993)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 1cf2251 (#994)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 39ccf1d (#995)
|
||||
* *(deps)* Update golang.org/x/term commit hash to 03fcf44 (#996)
|
||||
* *(deps)* Update golang.org/x/oauth2 commit hash to 6b3c2da (#1000)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 69063c4 (#1001)
|
||||
* *(deps)* Update module github.com/gabriel-vasile/mimetype to v1.4.0 (#1004)
|
||||
* *(deps)* Update postgres docker tag to v14 (#1005)
|
||||
* *(deps)* Update module github.com/go-redis/redis/v8 to v8.11.4 (#1003)
|
||||
* *(deps)* Update module github.com/mattn/go-sqlite3 to v1.14.9 (#1008)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 9d821ac (#1009)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 0ec99a6 (#1010)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 9d61738 (#1011)
|
||||
* *(deps)* Update module github.com/yuin/goldmark to v1.4.2 (#1012)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 8e51046 (#1016)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to d6a326f (#1017)
|
||||
* *(deps)* Update module github.com/swaggo/swag to v1.7.4 (#1018)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 711f33c (#1019)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 69cdffd (#1020)
|
||||
* *(deps)* Update golang.org/x/oauth2 commit hash to ba495a6 (#1022)
|
||||
* *(deps)* Update golang.org/x/image commit hash to 6944b10 (#1023)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 6e78728 (#1024)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to b3129d9 (#1025)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 611d5d6 (#1026)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 39c9dd3 (#1027)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to a2f17f7 (#1028)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 4dd7244 (#1029)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to ae416a5 (#1030)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 7861aae (#1031)
|
||||
* *(deps)* Update golang.org/x/oauth2 commit hash to d3ed0bb (#1032)
|
||||
* *(deps)* Update module github.com/labstack/gommon to v0.3.1 (#1033)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to c75c477 (#1034)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to ebca88c (#1035)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to e0b2ad0 (#1037)
|
||||
* *(deps)* Update module github.com/yuin/goldmark to v1.4.3 (#1038)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to ceb1ce7 (#1041)
|
||||
* *(deps)* Update module github.com/lib/pq to v1.10.4 (#1040)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 51b60fd (#1042)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 99a5385 (#1043)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to f221eed (#1044)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 0c823b9 (#1045)
|
||||
* *(deps)* Update module github.com/yuin/goldmark to v1.4.4 (#1046)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 0a5406a (#1048)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to b4de73f (#1047)
|
||||
* *(deps)* Update module github.com/ulule/limiter/v3 to v3.9.0 (#1049)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to ae814b3 (#1050)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to dee7805 (#1051)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to ef496fb (#1052)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to fe61309 (#1054)
|
||||
* *(deps)* Update module github.com/swaggo/swag to v1.7.6 (#1055)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to 5770296 (#1056)
|
||||
* *(deps)* Update module github.com/golang-jwt/jwt/v4 to v4.2.0 (#1057)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 94396e4 (#1058)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 97ca703 (#1059)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to 4570a08 (#1062)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 798191b (#1061)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to af8b642 (#1063)
|
||||
* *(deps)* Update module github.com/spf13/viper to v1.10.0 (#1064)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 03aa0b5 (#1067)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 3b038e5 (#1068)
|
||||
* *(deps)* Update module github.com/spf13/cobra to v1.3.0 (#1070)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 4825e8c (#1071)
|
||||
* *(deps)* Update module github.com/spf13/viper to v1.10.1 (#1072)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to e495a2d (#1073)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 4abf325 (#1074)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 1d35b9e (#1075)
|
||||
* *(deps)* Update module github.com/magefile/mage to v1.12.0 (#1076)
|
||||
* *(deps)* Update module github.com/magefile/mage to v1.12.1 (#1077)
|
||||
* *(deps)* Update module github.com/getsentry/sentry-go to v0.12.0 (#1079)
|
||||
* *(deps)* Update module github.com/swaggo/swag to v1.7.8 (#1080)
|
||||
* *(deps)* Update module github.com/spf13/afero to v1.7.0 (#1078)
|
||||
* *(deps)* Update module github.com/spf13/afero to v1.7.1 (#1081)
|
||||
* *(deps)* Update module github.com/mattn/go-sqlite3 to v1.14.10 (#1082)
|
||||
* *(deps)* Update module github.com/spf13/afero to v1.8.0 (#1083)
|
||||
* *(deps)* Update module github.com/labstack/echo/v4 to v4.6.2 (#1084)
|
||||
* *(deps)* Update module github.com/labstack/echo/v4 to v4.6.3 (#1089)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to a018aaa (#1088)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 5a964db (#1090)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to 5e0467b (#1091)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to da31bd3 (#1093)
|
||||
* *(deps)* Update module github.com/prometheus/client_golang to v1.12.0 (#1094)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to e04a857 (#1097)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to aa10faf (#1098)
|
||||
* *(deps)* Update module github.com/mattn/go-sqlite3 to v1.14.11 (#1099)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to 198e437 (#1100)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 99c3d69 (#1101)
|
||||
* *(deps)* Update module github.com/prometheus/client_golang to v1.12.1 (#1102)
|
||||
* *(deps)* Update klakegg/hugo docker tag to v0.92.0 (#1103)
|
||||
* *(deps)* Update klakegg/hugo docker tag to v0.92.1 (#1104)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to 30dcbda (#1105)
|
||||
* *(deps)* Update module github.com/swaggo/swag to v1.7.9 (#1106)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 1c1b9b1 (#1107)
|
||||
* *(deps)* Update module github.com/spf13/afero to v1.8.1 (#1108)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 5739886 (#1110)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to 20e1d8d (#1111)
|
||||
* *(deps)* Update module github.com/yuin/goldmark to v1.4.5 (#1112)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to bba287d (#1113)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to dad3315 (#1114)
|
||||
* *(deps)* Update module github.com/golang-jwt/jwt/v4 to v4.3.0 (#1117)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 3681064 (#1116)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to db63837 (#1115)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to f4118a5 (#1118)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to 8634188 (#1121)
|
||||
* *(deps)* Update module github.com/yuin/goldmark to v1.4.6 (#1122)
|
||||
* *(deps)* Update module github.com/yuin/goldmark to v1.4.7 (#1123)
|
||||
* *(deps)* Update module github.com/swaggo/swag to v1.8.0 (#1124)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 0005352 (#1125)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to f242548 (#1126)
|
||||
* *(deps)* Update klakegg/hugo docker tag to v0.92.2 (#1127)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to dbe011f (#1129)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 95c6836 (#1130)
|
||||
* *(deps)* Update golang.org/x/oauth2 commit hash to ee48083 (#1128)
|
||||
* *(deps)* Update module github.com/mattn/go-sqlite3 to v1.14.12 (#1132)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 4e6760a (#1131)
|
||||
* *(deps)* Update golang.org/x/image commit hash to 723b81c (#1133)
|
||||
* *(deps)* Update module github.com/labstack/echo/v4 to v4.7.0 (#1134)
|
||||
* *(deps)* Update klakegg/hugo docker tag to v0.93.0 (#1135)
|
||||
* *(deps)* Update module github.com/yuin/goldmark to v1.4.8 (#1136)
|
||||
* *(deps)* Update klakegg/hugo docker tag to v0.93.2 (#1137)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to 22a9840 (#1138)
|
||||
* *(deps)* Update golang.org/x/crypto commit hash to efcb850 (#1139)
|
||||
* *(deps)* Update golang.org/x/oauth2 commit hash to 6242fa9 (#1140)
|
||||
* *(deps)* Update golang.org/x/sys commit hash to b874c99 (#1141)
|
||||
* *(deps)* Update klakegg/hugo docker tag to v0.93.3 (#1142)
|
||||
* *(deps)* Update module github.com/labstack/echo/v4 to v4.7.1 (#1146)
|
||||
* *(deps)* Update module github.com/stretchr/testify to v1.7.1 (#1148)
|
||||
* *(deps)* Update module github.com/swaggo/swag to v1.8.1 (#1156)
|
||||
* *(deps)* Update module github.com/yuin/goldmark to v1.4.11 (#1143)
|
||||
* *(deps)* Update module github.com/spf13/cobra to v1.4.0 (#1145)
|
||||
* *(deps)* Update module github.com/lib/pq to v1.10.5 (#1157)
|
||||
* *(deps)* Update module github.com/spf13/viper to v1.11.0 (#1159)
|
||||
* *(deps)* Update module github.com/yuin/goldmark to v1.4.12 (#1162)
|
||||
* *(deps)* Update module github.com/prometheus/client_golang to v1.12.2 (#1166)
|
||||
* *(deps)* Update module github.com/mattn/go-sqlite3 to v1.14.13 (#1165)
|
||||
* *(deps)* Update module github.com/coreos/go-oidc/v3 to v3.2.0 (#1164)
|
||||
* *(deps)* Update module github.com/swaggo/swag to v1.8.2 (#1167)
|
||||
* *(deps)* Update module github.com/lib/pq to v1.10.6 (#1169)
|
||||
* *(deps)* Update module gopkg.in/yaml.v3 to v3.0.1 (#1179)
|
||||
* *(deps)* Update module github.com/imdario/mergo to v0.3.13 (#1178)
|
||||
* *(deps)* Update module github.com/stretchr/testify to v1.7.2 (#1182)
|
||||
* *(deps)* Update module github.com/swaggo/swag to v1.8.3 (#1185)
|
||||
* *(deps)* Update module github.com/spf13/cobra to v1.5.0 (#1192)
|
||||
* *(deps)* Update module github.com/golang-jwt/jwt/v4 to v4.4.2 (#1193)
|
||||
* *(deps)* Update module github.com/stretchr/testify to v1.8.0 (#1191)
|
||||
* *(deps)* Update module github.com/go-testfixtures/testfixtures/v3 to v3.8.0 (#1168)
|
||||
* *(deps)* Update module github.com/mattn/go-sqlite3 to v1.14.14 (#1194)
|
||||
* *(deps)* Update golang.org/x/term digest to 065cf7b (#1207)
|
||||
* *(deps)* Update golang.org/x/image digest to 41969df (#1203)
|
||||
* *(deps)* Update module github.com/yuin/goldmark to v1.4.13 (#1209)
|
||||
* *(deps)* Update golang.org/x/crypto digest to 0559593 (#1202)
|
||||
* *(deps)* Update module github.com/spf13/afero to v1.9.0 (#1210)
|
||||
* *(deps)* Update module github.com/gabriel-vasile/mimetype to v1.4.1 (#1208)
|
||||
* *(deps)* Update golang.org/x/sync digest to 0de741c (#1205)
|
||||
* *(deps)* Update github.com/c2h5oh/datasize digest to 859f65c (#1201)
|
||||
* *(deps)* Update golang.org/x/oauth2 digest to 2104d58 (#1204)
|
||||
* *(deps)* Update golang.org/x/sys digest to c0bba94 (#1206)
|
||||
* *(deps)* Update golang.org/x/oauth2 digest to c8730f7 (#1214)
|
||||
* *(deps)* Update module github.com/spf13/afero to v1.9.2 (#1215)
|
||||
* *(deps)* Update module github.com/swaggo/swag to v1.8.4 (#1216)
|
||||
* *(deps)* Update module github.com/spf13/viper to v1.12.0 (#1180)
|
||||
* *(deps)* Update golang.org/x/sys digest to 1609e55 (#1217)
|
||||
* *(deps)* Update module github.com/go-testfixtures/testfixtures/v3 to v3.8.1 (#1226)
|
||||
* *(deps)* Update module go to 1.18 (#1225)
|
||||
|
||||
### Documentation
|
||||
* Add docker-compose example with no proxy ([4255bc3](4255bc3a945b6fe4314e3cd3f62908dd1be1ff4a))
|
||||
* Add another youtube tutorial ([dbd6f36](dbd6f36da6e56355993cc1411379997e26c88b36))
|
||||
* Fix api url in docker examples without a proxy ([68998e9](68998e90a446569869fb150bd5fc0739f496b066))
|
||||
* Make sure all links to vikunja pages are https ([cc612d5](cc612d505f22e5d895b6ebda61fe62498634cec5))
|
||||
* Update backup instructions ([4829c89](4829c899400544ad27cacfb7d19b40988302a413))
|
||||
* Add postgres to docker-compose examples ([2aea169](2aea1691cf33b7d9e03fbe2c711af7d8f76d9724))
|
||||
* Improve development docs ([9bf32aa](9bf32aae99a7e69cce0cd4477e8fc8ddcaea25ea))
|
||||
* Add another tutorial link ([1fa74cb](1fa74cba6407c2b694b14f8439f1492476433d62))
|
||||
* Improve wording for systemd ([13561f2](13561f211493903b17c856b3010345ea9df725d4))
|
||||
* Update testing ([da318e3](da318e3db15121ba864db8450a76ba9ed18b9fd5))
|
||||
* Add guide for Synology NAS ([049ae39](049ae39c62079f77921b7a9fad5023b2c1c0c1c5))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* *(docs)* Add details of using NGINX Proxy Manager to the Reverse Proxy docs (#13)
|
||||
* *(docs)* Add versions explanation
|
||||
* *(mail)* Don't try to authenticate when no username and password was provided* Add better error logs for mage commands ([bb086eb](bb086eb9f87669f844c283d42ea9ca9f3f5a7877))
|
||||
* Expose if task comments are enabled or not in /info ([ae8db17](ae8db176db57fa6176e00b87924f70352332ca66))
|
||||
* Improve account deletion email grammar (#1006) ([dcb52c0](dcb52c00f1c6b3217e2b508d7799fc83adb3b055))
|
||||
* Add more debug logging when deleting users ([8f55af0](8f55af07c936218487ec94e65c6673fbddd0cdb5))
|
||||
* Don't require a password for data export from users authenticated with third-party auth ([9eca971](9eca971c938699d481915fb6e14c765aea1fa3b5))
|
||||
* Expose if a user is a local user through its jwt token ([516c812](516c812043e77be7f834ae1326d13d39e156ef77))
|
||||
* Expose if a user is a local user through the /user endpoint ([2683ef2](2683ef23d538eb846d5d799798fa82cca70dc017))
|
||||
* Enable rate limit for unauthenticated routes ([093d0c6](093d0c65ca6338358dbd1df904daadd7808f2817))
|
||||
* Use wallpaper topic for default unsplash background list ([88a2ced](88a2cede19f1844814530af948c3cc5a0b026419))
|
||||
* Gravatar - Lowercase emails before MD5 hash (#10) ([36bf3d2](36bf3d216a7be28e917e2816a9e5da43439f2c20))
|
||||
* Add marble avatar (#1060) ([73ee696](73ee696fc3cf941af2d2c2cf81224aa01f93234e))
|
||||
* Save user language in the settings ([a98119f](a98119f2d670a11efab6008129b767f9208f8113))
|
||||
* Add time zone setting for reminders (#1092) ([61d49c3](61d49c3a56a59e52ce407b858ddd4aa573dbee9d))
|
||||
* Add long-lived api tokens (#1085) ([1322cb1](1322cb16d76a40ad90631e3e091da0f0d44957a9))
|
||||
* Upgrade golangci-lint to 1.45.2 ([5cf263a](5cf263a86f954a38cbfafb6b0857bf591f82a811))
|
||||
* Add date math for filters (#1086) ([0a1d8c9](0a1d8c940410b03a78016ac6110883ca05484816))
|
||||
* Add migration to create BlurHash strings for all list backgrounds ([362706b](362706b38d52720b5a1615e185a985b7708168f7))
|
||||
* Generate a BlurHash when uploading a new image ([f83b09a](f83b09af59ed25425a16824ccf48d903c81e861a))
|
||||
* Save BlurHash from unsplash when selecting a photo from unsplash ([2ec7d7a](2ec7d7a8a85cc12c07d20cfab9b90a78a7857eb6))
|
||||
* Return BlurHash for unsplash search results ([6df8658](6df865876df961f2bec476126bf6e7fbe5d43e0e))
|
||||
* Add caldav tokens (#1065) ([e4b50e8](e4b50e84a44f809cc829c2fdb6f52b03b40a367b))
|
||||
* Ability to serve static files (#1174) ([acaa850](acaa85083f2bebbc67608ae0f454ed5e9a3ef8a0))
|
||||
* Restrict max avatar size ([2f25b48](2f25b48869f59256bf7d692c4486c64c30b85e5e))
|
||||
* Send overdue tasks email notification at 9:00 in the user's time zone ([7eb3b96](7eb3b96a4465ca6648572b07c506c06f2c28c375))
|
||||
* Add setting to change overdue tasks reminder email time ([8869adf](8869adfc276f674b686bf68f949d7efbb417e55b))
|
||||
* Allow only the authors of task comments to edit them ([01271c4](01271c4c0111b3b040dcb9a0d502d31078ad6d4b))
|
||||
* Migrate away from gomail ([30e0e98](30e0e98f7738e36698990523377f47edcbf6806c))
|
||||
* Embed the vikunja logo as inline attachment ([f4f8450](f4f8450d166f1a836eea202dd0340d2156d3dfe9))
|
||||
* Use embed fs directly to embed the logo in mails ([73c4c39](73c4c399e5d610bb713f1e9feab543e0425ee959))
|
||||
* Use actual uuids for tasks ([62325de](62325de9cd5da5b70987081956a28e7baa907081))
|
||||
* Add issue template ([117f6b3](117f6b38e1d35c09f2657975ea75dcfedcd8425d))
|
||||
|
||||
|
||||
### Miscellaneous Tasks
|
||||
|
||||
* *(ci)* Use latest version of s3 plugin
|
||||
* *(ci)* Sign drone config
|
||||
* *(docs)* Update docs about compiling from source
|
||||
* *(docs)* Redirect properly from /docs/docs
|
||||
* *(docs)* Add new mailer option to docs
|
||||
* *(docs)* Clarify openid setup with environment variables
|
||||
* *(docs)* Add frontendurl to all example configs
|
||||
* *(mage)* Don't set api packages when they are not used* Sign drone config ([1d8d0f1](1d8d0f140e4f2a59947167bd597e5f12b84b009d))
|
||||
* Cleanup namespace creation ([b60c69c](b60c69c5a8c004a780b989cf0bb8ab6455086b0f))
|
||||
* Generate swagger docs ([ba2bdff](ba2bdff39109db9ecc4b525e39e2642b41ac03b8))
|
||||
* Go mod tidy ([726a517](726a517bec731f1af8e3186e280718fef02cadf7))
|
||||
* Upgrade trello api wrapper and remove fork ([7e99618](7e99618319547c7e7dfa2cc063f654300f7074fb))
|
||||
* Use our custom build image to build docker image ([251b877](251b877015761fdd2b8dbd18cd8ec696dc374103))
|
||||
* Update golangci-lint ([430057a](430057a404b04e75c62a15693f479c6fc8e63189))
|
||||
|
||||
|
||||
### Other
|
||||
|
||||
* *(other)* Healthcheck endpoint (#998)
|
||||
* *(other)* Added the ability to configure the JWT expiry date using a new server.jwtttl config parameter. (#999)
|
||||
* *(other)* Enable a list to be moved across namespaces (#1096)
|
||||
* *(other)* A bunch of dependency updates at once (#1155)
|
||||
* *(other)* Add client-cert parameters of the Go pq driver to the Vikunja config (#1161)
|
||||
* *(other)* Add exec to run script to run app as PID 1 (#1200)
|
||||
|
||||
## [0.18.1] - 2021-09-08
|
||||
|
||||
### Fixed
|
||||
|
|
20
Dockerfile
20
Dockerfile
|
@ -1,29 +1,27 @@
|
|||
|
||||
##############
|
||||
# Build stage
|
||||
FROM golang:1-alpine3.12 AS build-env
|
||||
FROM golang:1.18-alpine AS build-env
|
||||
|
||||
RUN apk --no-cache add build-base git && \
|
||||
go install github.com/magefile/mage@latest && \
|
||||
mv /go/bin/mage /usr/local/go/bin
|
||||
|
||||
ARG VIKUNJA_VERSION
|
||||
ENV TAGS "sqlite"
|
||||
ENV GO111MODULE=on
|
||||
|
||||
# Build deps
|
||||
RUN apk --no-cache add build-base git
|
||||
|
||||
# Setup repo
|
||||
COPY . ${GOPATH}/src/code.vikunja.io/api
|
||||
WORKDIR ${GOPATH}/src/code.vikunja.io/api
|
||||
COPY . /go/src/code.vikunja.io/api
|
||||
WORKDIR /go/src/code.vikunja.io/api
|
||||
|
||||
# Checkout version if set
|
||||
RUN if [ -n "${VIKUNJA_VERSION}" ]; then git checkout "${VIKUNJA_VERSION}"; fi \
|
||||
&& go install github.com/magefile/mage \
|
||||
&& mage build:clean build
|
||||
|
||||
###################
|
||||
# The actual image
|
||||
# Note: I wanted to use the scratch image here, but unfortunatly the go-sqlite bindings require cgo and
|
||||
# because of this, the container would not start when I compiled the image without cgo.
|
||||
FROM alpine:3.12
|
||||
FROM alpine:3.16
|
||||
LABEL maintainer="maintainers@vikunja.io"
|
||||
|
||||
WORKDIR /app/vikunja/
|
||||
|
@ -39,7 +37,7 @@ RUN apk --no-cache add shadow && \
|
|||
chown vikunja -R /app/vikunja
|
||||
COPY run.sh /run.sh
|
||||
|
||||
# Fix time zone settings not working
|
||||
# Add time zone data
|
||||
RUN apk --no-cache add tzdata
|
||||
|
||||
# Files permissions
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
|
||||
##############
|
||||
# Build stage
|
||||
FROM golang:1.18-buster AS build-env
|
||||
|
||||
RUN go install github.com/magefile/mage@latest && \
|
||||
mv /go/bin/mage /usr/local/go/bin
|
||||
|
||||
ARG VIKUNJA_VERSION
|
||||
|
||||
# Setup repo
|
||||
COPY . /go/src/code.vikunja.io/api
|
||||
WORKDIR /go/src/code.vikunja.io/api
|
||||
|
||||
# Checkout version if set
|
||||
RUN if [ -n "${VIKUNJA_VERSION}" ]; then git checkout "${VIKUNJA_VERSION}"; fi \
|
||||
&& mage build:clean build
|
||||
|
||||
###################
|
||||
# The actual image
|
||||
# Note: I wanted to use the scratch image here, but unfortunatly the go-sqlite bindings require cgo and
|
||||
# because of this, the container would not start when I compiled the image without cgo.
|
||||
# We're using debian as a base image here because the latest alpine image does not work with arm.
|
||||
FROM debian:buster-slim
|
||||
LABEL maintainer="maintainers@vikunja.io"
|
||||
|
||||
WORKDIR /app/vikunja/
|
||||
COPY --from=build-env /go/src/code.vikunja.io/api/vikunja .
|
||||
ENV VIKUNJA_SERVICE_ROOTPATH=/app/vikunja/
|
||||
|
||||
# Dynamic permission changing stuff
|
||||
ENV PUID 1000
|
||||
ENV PGID 1000
|
||||
RUN addgroup --gid ${PGID} vikunja && \
|
||||
chown ${PUID} -R /app/vikunja && \
|
||||
useradd --shell /bin/sh --gid vikunja --uid ${PUID} --home-dir /app/vikunja vikunja
|
||||
COPY run.sh /run.sh
|
||||
|
||||
# Fix time zone settings not working
|
||||
RUN apt-get update && apt-get install -y tzdata && apt-get clean
|
||||
|
||||
# Files permissions
|
||||
RUN mkdir /app/vikunja/files && \
|
||||
chown -R vikunja /app/vikunja/files
|
||||
VOLUME /app/vikunja/files
|
||||
|
||||
CMD ["/run.sh"]
|
||||
EXPOSE 3456
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
[![Build Status](https://drone.kolaente.de/api/badges/vikunja/api/status.svg)](https://drone.kolaente.de/vikunja/api)
|
||||
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](LICENSE)
|
||||
[![Download](https://img.shields.io/badge/download-v0.18.1-brightgreen.svg)](https://dl.vikunja.io)
|
||||
[![Download](https://img.shields.io/badge/download-v0.19.2-brightgreen.svg)](https://dl.vikunja.io)
|
||||
[![Docker Pulls](https://img.shields.io/docker/pulls/vikunja/api.svg)](https://hub.docker.com/r/vikunja/api/)
|
||||
[![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/api)](https://goreportcard.com/report/kolaente.dev/vikunja/api)
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
[changelog]
|
||||
body = """
|
||||
{% if version %}\
|
||||
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
|
||||
{% else %}\
|
||||
## [unreleased]
|
||||
{% endif %}\
|
||||
|
||||
|
||||
{% for group, commits in commits | group_by(attribute="group") %}
|
||||
### {{ group | upper_first }}
|
||||
{% for commit in commits
|
||||
| filter(attribute="scope")
|
||||
| sort(attribute="scope") %}
|
||||
* *({{commit.scope}})* {{ commit.message | upper_first }}
|
||||
{%- if commit.breaking %}
|
||||
{% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- for commit in commits %}
|
||||
{%- if commit.scope -%}
|
||||
{% else -%}
|
||||
* {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }}))
|
||||
{% if commit.breaking -%}
|
||||
{% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
{% endfor -%}
|
||||
{% raw %}\n{% endraw %}\
|
||||
{% endfor %}\n
|
||||
|
||||
"""
|
||||
#{% for group, commits in commits | group_by(attribute="group") %}
|
||||
# ### {{ group | upper_first }}
|
||||
# {% for commit in commits %}\
|
||||
# - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }}))
|
||||
# {% endfor %}\
|
||||
#{% endfor %}\n
|
||||
# remove the leading and trailing whitespace from the template
|
||||
trim = true
|
||||
|
||||
[git]
|
||||
conventional_commits = true
|
||||
filter_unconventional = false
|
||||
commit_parsers = [
|
||||
{ message = ".*(deps).*", group = "Dependencies"},
|
||||
{ message = "^feat", group = "Features"},
|
||||
{ message = "^fix", group = "Bug Fixes"},
|
||||
{ message = "^doc", group = "Documentation"},
|
||||
{ message = "^perf", group = "Performance"},
|
||||
{ message = "^refactor", group = "Refactor"},
|
||||
{ message = "^style", group = "Styling"},
|
||||
{ message = "^test", group = "Testing"},
|
||||
{ message = "^chore\\(release\\): prepare for", skip = true},
|
||||
{ message = "^chore", group = "Miscellaneous Tasks"},
|
||||
{ body = ".*security", group = "Security"},
|
||||
{ message = ".*", group = "Other", default_scope = "other"}, # Everything that's not a conventional commit goes into the "Other" category
|
||||
]
|
||||
|
|
@ -301,6 +301,8 @@ auth:
|
|||
enabled: false
|
||||
# The url to redirect clients to. Defaults to the configured frontend url. If you're using Vikunja with the official
|
||||
# frontend, you don't need to change this value.
|
||||
# **Note:** The redirect url must exactly match the configured redirect url with the third party provider.
|
||||
# This includes all slashes at the end or protocols.
|
||||
redirecturl: <frontend url>
|
||||
# A list of enabled providers
|
||||
providers:
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "Hosting Vikunja with k8s"
|
||||
date: 2022-08-12T13:41:48+02:00
|
||||
draft: false
|
||||
type: "doc"
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "setup"
|
||||
---
|
||||
|
||||
There are two third-party Helm-Charts which can be used to host Vikunja with k8s:
|
||||
|
||||
* [Truecharts](https://truecharts.org/docs/charts/stable/vikunja/)
|
||||
* [k8s at Home](https://github.com/k8s-at-home/charts)
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
date: "2022-08-09:00:00+02:00"
|
||||
title: "OpenID example configurations"
|
||||
draft: false
|
||||
type: "doc"
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "setup"
|
||||
---
|
||||
|
||||
# OpenID example configurations
|
||||
|
||||
On this page you will find examples about how to set up Vikunja with a third-party OpenID provider.
|
||||
To add another example, please [edit this document](https://kolaente.dev/vikunja/api/src/branch/main/docs/content/doc/setup/openid-examples.md) and send a PR.
|
||||
|
||||
{{< table_of_contents >}}
|
||||
|
||||
## Authelia
|
||||
|
||||
Vikunja Config:
|
||||
|
||||
```yaml
|
||||
openid:
|
||||
enabled: true
|
||||
redirecturl: https://vikunja.mydomain.com/auth/openid/ <---- slash at the end is important
|
||||
providers:
|
||||
- name: Authelia
|
||||
authurl: https://login.mydomain.com
|
||||
clientid: <vikunja-id>
|
||||
clientsecret: <vikunja secret>
|
||||
```
|
||||
|
||||
Authelia config:
|
||||
|
||||
```yaml
|
||||
- id: <vikunja-id>
|
||||
description: Vikunja
|
||||
secret: <vikunja secret>
|
||||
redirect_uris:
|
||||
- https://vikunja.mydomain.com/auth/openid/ <----- Matching slash at the end
|
||||
scopes:
|
||||
- openid
|
||||
- email
|
||||
- profile
|
||||
```
|
|
@ -4,8 +4,8 @@ title: "Errors"
|
|||
draft: false
|
||||
type: "doc"
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "usage"
|
||||
sidebar:
|
||||
parent: "usage"
|
||||
---
|
||||
|
||||
# Errors
|
||||
|
@ -52,14 +52,15 @@ This document describes the different errors Vikunja can return.
|
|||
|
||||
## List
|
||||
|
||||
| ErrorCode | HTTP Status Code | Description |
|
||||
|-----------|------------------|-------------|
|
||||
| 3001 | 404 | The list does not exist. |
|
||||
| 3004 | 403 | The user needs to have read permissions on that list to perform that action. |
|
||||
| 3005 | 400 | The list title cannot be empty. |
|
||||
| 3006 | 404 | The list share does not exist. |
|
||||
| 3007 | 400 | A list with this identifier already exists. |
|
||||
| ErrorCode | HTTP Status Code | Description |
|
||||
|-----------|------------------|-------------------------------------------------------------------------------------------------------------------------------|
|
||||
| 3001 | 404 | The list does not exist. |
|
||||
| 3004 | 403 | The user needs to have read permissions on that list to perform that action. |
|
||||
| 3005 | 400 | The list title cannot be empty. |
|
||||
| 3006 | 404 | The list share does not exist. |
|
||||
| 3007 | 400 | A list with this identifier already exists. |
|
||||
| 3008 | 412 | The list is archived and can therefore only be accessed read only. This is also true for all tasks associated with this list. |
|
||||
| 3009 | 412 | The list cannot belong to a dynamically generated namespace like "Favorites". |
|
||||
|
||||
## Task
|
||||
|
||||
|
|
30
go.mod
30
go.mod
|
@ -34,22 +34,22 @@ require (
|
|||
github.com/getsentry/sentry-go v0.13.0
|
||||
github.com/go-redis/redis/v8 v8.11.5
|
||||
github.com/go-sql-driver/mysql v1.6.0
|
||||
github.com/go-testfixtures/testfixtures/v3 v3.8.0
|
||||
github.com/go-testfixtures/testfixtures/v3 v3.8.1
|
||||
github.com/golang-jwt/jwt/v4 v4.4.2
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/iancoleman/strcase v0.2.0
|
||||
github.com/imdario/mergo v0.3.13
|
||||
github.com/jinzhu/copier v0.3.5
|
||||
github.com/labstack/echo/v4 v4.7.2
|
||||
github.com/labstack/echo/v4 v4.8.0
|
||||
github.com/labstack/gommon v0.3.1
|
||||
github.com/lib/pq v1.10.6
|
||||
github.com/magefile/mage v1.13.0
|
||||
github.com/mattn/go-sqlite3 v1.14.14
|
||||
github.com/mattn/go-sqlite3 v1.14.15
|
||||
github.com/olekukonko/tablewriter v0.0.5
|
||||
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
|
||||
github.com/pquerna/otp v1.3.0
|
||||
github.com/prometheus/client_golang v1.12.2
|
||||
github.com/prometheus/client_golang v1.13.0
|
||||
github.com/robfig/cron/v3 v3.0.1
|
||||
github.com/samedi/caldav-go v3.0.0+incompatible
|
||||
github.com/spf13/afero v1.9.2
|
||||
|
@ -60,14 +60,14 @@ require (
|
|||
github.com/tkuchiki/go-timezone v0.2.2
|
||||
github.com/ulule/limiter/v3 v3.10.0
|
||||
github.com/vectordotdev/go-datemath v0.1.1-0.20211214182920-0a4ac8742b93
|
||||
github.com/wneessen/go-mail v0.2.5
|
||||
github.com/wneessen/go-mail v0.2.6
|
||||
github.com/yuin/goldmark v1.4.13
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d
|
||||
golang.org/x/image v0.0.0-20220617043117-41969df76e82
|
||||
golang.org/x/oauth2 v0.0.0-20220718184931-c8730f7fcb92
|
||||
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f
|
||||
golang.org/x/sys v0.0.0-20220731174439-a90be440212d
|
||||
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467
|
||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa
|
||||
golang.org/x/image v0.0.0-20220722155232-062f8c9fd539
|
||||
golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab
|
||||
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035
|
||||
gopkg.in/d4l3k/messagediff.v1 v1.2.1
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
src.techknowlogick.com/xgo v1.4.1-0.20210311222705-d25c33fcd864
|
||||
|
@ -124,8 +124,8 @@ require (
|
|||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
github.com/prometheus/common v0.32.1 // indirect
|
||||
github.com/prometheus/procfs v0.7.3 // indirect
|
||||
github.com/prometheus/common v0.37.0 // indirect
|
||||
github.com/prometheus/procfs v0.8.0 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
|
@ -142,7 +142,7 @@ require (
|
|||
golang.org/x/tools v0.1.10 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/protobuf v1.28.0 // indirect
|
||||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
gopkg.in/ini.v1 v1.66.4 // indirect
|
||||
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
|
@ -156,4 +156,4 @@ replace (
|
|||
gopkg.in/fsnotify.v1 => github.com/kolaente/fsnotify v1.4.10-0.20200411160148-1bc3c8ff4048 // See https://github.com/fsnotify/fsnotify/issues/328 and https://github.com/golang/go/issues/26904
|
||||
)
|
||||
|
||||
go 1.17
|
||||
go 1.19
|
||||
|
|
37
go.sum
37
go.sum
|
@ -235,9 +235,11 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2
|
|||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
|
||||
github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0=
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
||||
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
|
||||
github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8=
|
||||
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
|
||||
|
@ -264,6 +266,8 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me
|
|||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/go-testfixtures/testfixtures/v3 v3.8.0 h1:ZdMx3/TQvzOWMm7x03IMpGTsIKRo6WCIfNm6dBOYO1M=
|
||||
github.com/go-testfixtures/testfixtures/v3 v3.8.0/go.mod h1:r3jeE9Ten7qBsZYSCwZiqCCUnq4pJsZEsq5ShqoX5aA=
|
||||
github.com/go-testfixtures/testfixtures/v3 v3.8.1 h1:uonwvepqRvSgddcrReZQhojTlWlmOlHkYAb9ZaOMWgU=
|
||||
github.com/go-testfixtures/testfixtures/v3 v3.8.1/go.mod h1:Kdu7YeMC0KRXVHdaQ91Vmx3pcjoTF63h4f1qTJDdXLA=
|
||||
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
|
||||
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
|
||||
|
@ -528,6 +532,8 @@ github.com/labstack/echo/v4 v4.1.16/go.mod h1:awO+5TzAjvL8XpibdsfXxPgHr+orhtXZJZ
|
|||
github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y=
|
||||
github.com/labstack/echo/v4 v4.7.2 h1:Kv2/p8OaQ+M6Ex4eGimg9b9e6icoxA42JSlOR3msKtI=
|
||||
github.com/labstack/echo/v4 v4.7.2/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks=
|
||||
github.com/labstack/echo/v4 v4.8.0 h1:wdc6yKVaHxkNOEdz4cRZs1pQkwSXPiRjq69yWP4QQS8=
|
||||
github.com/labstack/echo/v4 v4.8.0/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks=
|
||||
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
|
||||
github.com/labstack/gommon v0.3.1 h1:OomWaJXm7xR6L1HmEtGyQf26TEn7V6X88mktX9kee9o=
|
||||
github.com/labstack/gommon v0.3.1/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM=
|
||||
|
@ -586,6 +592,8 @@ github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A
|
|||
github.com/mattn/go-sqlite3 v1.14.13/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/mattn/go-sqlite3 v1.14.14 h1:qZgc/Rwetq+MtyE18WhzjokPD93dNqLGNT3QJuLvBGw=
|
||||
github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI=
|
||||
github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
|
||||
github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
|
@ -675,8 +683,11 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn
|
|||
github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
|
||||
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
|
||||
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
|
||||
github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
|
||||
github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34=
|
||||
github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
|
||||
github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU=
|
||||
github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
|
@ -690,6 +701,8 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8
|
|||
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
|
||||
github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4=
|
||||
github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
|
||||
github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE=
|
||||
github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
|
||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
|
@ -698,6 +711,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
|
|||
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||
github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU=
|
||||
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||
github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo=
|
||||
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
|
@ -806,6 +821,8 @@ github.com/vectordotdev/go-datemath v0.1.1-0.20211214182920-0a4ac8742b93 h1:bT0Z
|
|||
github.com/vectordotdev/go-datemath v0.1.1-0.20211214182920-0a4ac8742b93/go.mod h1:PnwzbSst7KD3vpBzzlntZU5gjVa455Uqa5QPiKSYJzQ=
|
||||
github.com/wneessen/go-mail v0.2.5 h1:lVQ5Q1hYaUNU/VL9F4AOtYaBAxgmrH+6W6wwMcDpKDE=
|
||||
github.com/wneessen/go-mail v0.2.5/go.mod h1:m25lkU2GYQnlVr6tdwK533/UXxo57V0kLOjaFYmub0E=
|
||||
github.com/wneessen/go-mail v0.2.6 h1:AckQpPn1TcKEwXnKFK/wsOnqbkBA5XbPObuZuUm46nY=
|
||||
github.com/wneessen/go-mail v0.2.6/go.mod h1:m25lkU2GYQnlVr6tdwK533/UXxo57V0kLOjaFYmub0E=
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
|
||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
|
||||
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
||||
|
@ -880,6 +897,8 @@ golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrb
|
|||
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c=
|
||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
|
@ -897,6 +916,8 @@ golang.org/x/image v0.0.0-20220302094943-723b81ca9867 h1:TcHcE0vrmgzNH1v3ppjcMGb
|
|||
golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
|
||||
golang.org/x/image v0.0.0-20220617043117-41969df76e82 h1:KpZB5pUSBvrHltNEdK/tw0xlPeD13M6M6aGP32gKqiw=
|
||||
golang.org/x/image v0.0.0-20220617043117-41969df76e82/go.mod h1:doUCurBvlfPMKfmIpRIywoHmhN3VyhnoFDbvIEWF4hY=
|
||||
golang.org/x/image v0.0.0-20220722155232-062f8c9fd539 h1:/eM0PCrQI2xd471rI+snWuu251/+/jpBpZqir2mPdnU=
|
||||
golang.org/x/image v0.0.0-20220722155232-062f8c9fd539/go.mod h1:doUCurBvlfPMKfmIpRIywoHmhN3VyhnoFDbvIEWF4hY=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
|
@ -1012,6 +1033,8 @@ golang.org/x/oauth2 v0.0.0-20220630143837-2104d58473e0 h1:VnGaRqoLmqZH/3TMLJwYCE
|
|||
golang.org/x/oauth2 v0.0.0-20220630143837-2104d58473e0/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
|
||||
golang.org/x/oauth2 v0.0.0-20220718184931-c8730f7fcb92 h1:oVlhw3Oe+1reYsE2Nqu19PDJfLzwdU3QUUrG86rLK68=
|
||||
golang.org/x/oauth2 v0.0.0-20220718184931-c8730f7fcb92/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
|
||||
golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7 h1:dtndE8FcEta75/4kHF3AbpuWzV6f1LjnLrM4pe2SZrw=
|
||||
golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
@ -1026,6 +1049,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cO
|
|||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8=
|
||||
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
|
@ -1125,12 +1150,22 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JC
|
|||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220731174439-a90be440212d h1:Sv5ogFZatcgIMMtBSTTAgMYsicp25MXBubjXNDKwm80=
|
||||
golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220804182731-e052cef7d300 h1:ymzm2lKPkdNE1FM0FAss9EdyGB+YzDN2P3jMJODYr2M=
|
||||
golang.org/x/sys v0.0.0-20220804182731-e052cef7d300/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 h1:9vYwv7OjYaky/tlAeD7C4oC9EsPTlaFl1H2jS++V+ME=
|
||||
golang.org/x/sys v0.0.0-20220804214406-8e32c043e418/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664 h1:v1W7bwXHsnLLloWYTVEdvGvA7BHMeBYsPcF0GLDxIRs=
|
||||
golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM=
|
||||
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 h1:Q5284mrmYTpACcm+eAKjKJH48BBwSyfJqmmGDTtT8Vc=
|
||||
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
@ -1392,6 +1427,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ
|
|||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
|
||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
|
12
magefile.go
12
magefile.go
|
@ -79,8 +79,10 @@ func runCmdWithOutput(name string, arg ...string) (output []byte, err error) {
|
|||
cmd := exec.Command(name, arg...)
|
||||
output, err = cmd.Output()
|
||||
if err != nil {
|
||||
ee := err.(*exec.ExitError)
|
||||
return nil, fmt.Errorf("error running command: %s, %s", string(ee.Stderr), err)
|
||||
if ee, is := err.(*exec.ExitError); is {
|
||||
return nil, fmt.Errorf("error running command: %s, %s", string(ee.Stderr), err)
|
||||
}
|
||||
return nil, fmt.Errorf("error running command: %s", err)
|
||||
}
|
||||
|
||||
return output, nil
|
||||
|
@ -350,7 +352,7 @@ func (Test) Unit() {
|
|||
mg.Deps(initVars)
|
||||
setApiPackages()
|
||||
// We run everything sequentially and not in parallel to prevent issues with real test databases
|
||||
args := append([]string{"test", Goflags[0], "-p", "1", "-coverprofile", "cover.out", "-timeout", "20m"}, ApiPackages...)
|
||||
args := append([]string{"test", Goflags[0], "-p", "1", "-coverprofile", "cover.out", "-timeout", "45m"}, ApiPackages...)
|
||||
runAndStreamOutput("go", args...)
|
||||
}
|
||||
|
||||
|
@ -365,7 +367,7 @@ func (Test) Coverage() {
|
|||
func (Test) Integration() {
|
||||
mg.Deps(initVars)
|
||||
// We run everything sequentially and not in parallel to prevent issues with real test databases
|
||||
runAndStreamOutput("go", "test", Goflags[0], "-p", "1", "-timeout", "20m", PACKAGE+"/pkg/integrations")
|
||||
runAndStreamOutput("go", "test", Goflags[0], "-p", "1", "-timeout", "45m", PACKAGE+"/pkg/integrations")
|
||||
}
|
||||
|
||||
type Check mg.Namespace
|
||||
|
@ -404,7 +406,7 @@ func checkGolangCiLintInstalled() {
|
|||
mg.Deps(initVars)
|
||||
if err := exec.Command("golangci-lint").Run(); err != nil && strings.Contains(err.Error(), "executable file not found") {
|
||||
fmt.Println("Please manually install golangci-lint by running")
|
||||
fmt.Println("curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.31.0")
|
||||
fmt.Println("curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.47.3")
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,6 @@ func getClient() (*mail.Client, error) {
|
|||
}
|
||||
|
||||
opts := []mail.Option{
|
||||
mail.WithSMTPAuth(authType),
|
||||
mail.WithPort(config.MailerPort.GetInt()),
|
||||
mail.WithTLSPolicy(tlsPolicy),
|
||||
//#nosec G402
|
||||
|
@ -58,6 +57,10 @@ func getClient() (*mail.Client, error) {
|
|||
}),
|
||||
}
|
||||
|
||||
if config.MailerUsername.GetString() != "" && config.MailerPassword.GetString() != "" {
|
||||
opts = append(opts, mail.WithSMTPAuth(authType))
|
||||
}
|
||||
|
||||
if config.MailerUsername.GetString() != "" {
|
||||
opts = append(opts, mail.WithUsername(config.MailerUsername.GetString()))
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package migration
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"image"
|
||||
|
||||
"code.vikunja.io/api/pkg/files"
|
||||
|
@ -64,9 +65,12 @@ func init() {
|
|||
}
|
||||
|
||||
src, _, err := image.Decode(bgFile.File)
|
||||
if err != nil {
|
||||
if err != nil && !errors.Is(err, image.ErrFormat) {
|
||||
return err
|
||||
}
|
||||
if err != nil && errors.Is(err, image.ErrFormat) {
|
||||
log.Warningf("Could not generate a blur hash of list %d's background image: %s", l.ID, err)
|
||||
}
|
||||
|
||||
dst := image.NewRGBA(image.Rect(0, 0, 32, 32))
|
||||
draw.NearestNeighbor.Scale(dst, dst.Rect, src, src.Bounds(), draw.Over, nil)
|
||||
|
|
|
@ -0,0 +1,108 @@
|
|||
// Vikunja is a to-do list application to facilitate your life.
|
||||
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public Licensee as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public Licensee for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public Licensee
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
package migration
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"src.techknowlogick.com/xormigrate"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
migrations = append(migrations, &xormigrate.Migration{
|
||||
ID: "20220815200851",
|
||||
Description: "Migrate saved assignee filter to usernames instead of IDs",
|
||||
Migrate: func(tx *xorm.Engine) error {
|
||||
filters := []map[string]interface{}{} // not using the type here so that the migration does not depend on it
|
||||
err := tx.Select("*").
|
||||
Table("saved_filters").
|
||||
Find(&filters)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, f := range filters {
|
||||
filter := map[string]interface{}{}
|
||||
filterJSON, is := f["filters"].(string)
|
||||
if !is {
|
||||
continue
|
||||
}
|
||||
err = json.Unmarshal([]byte(filterJSON), &filter)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
filterBy := filter["filter_by"].([]interface{})
|
||||
filterValue := filter["filter_value"].([]interface{})
|
||||
for p, fb := range filterBy {
|
||||
if fb == "assignees" || fb == "user_id" {
|
||||
userIDs := []int64{}
|
||||
for _, sid := range strings.Split(filterValue[p].(string), ",") {
|
||||
id, err := strconv.ParseInt(sid, 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
userIDs = append(userIDs, id)
|
||||
}
|
||||
|
||||
usernames := []string{}
|
||||
err := tx.Select("username").
|
||||
Table("users").
|
||||
In("id", userIDs).
|
||||
Find(&usernames)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
userfilter := ""
|
||||
for i, username := range usernames {
|
||||
if i > 0 {
|
||||
userfilter += ","
|
||||
}
|
||||
userfilter += username
|
||||
}
|
||||
filterValue[p] = userfilter
|
||||
}
|
||||
}
|
||||
|
||||
filter["filter_value"] = filterValue
|
||||
filtersJSON, err := json.Marshal(filter)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
f["filters"] = string(filtersJSON)
|
||||
|
||||
_, err = tx.Where("id = ?", f["id"]).
|
||||
Cols("filters").
|
||||
NoAutoCondition().
|
||||
Table("saved_filters").
|
||||
Update(f)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
Rollback: func(tx *xorm.Engine) error {
|
||||
return nil
|
||||
},
|
||||
})
|
||||
}
|
|
@ -237,7 +237,7 @@ type ErrListIsArchived struct {
|
|||
ListID int64
|
||||
}
|
||||
|
||||
// IsErrListIsArchived checks if an error is a .
|
||||
// IsErrListIsArchived checks if an error is a list is archived error.
|
||||
func IsErrListIsArchived(err error) bool {
|
||||
_, ok := err.(ErrListIsArchived)
|
||||
return ok
|
||||
|
@ -255,6 +255,34 @@ func (err ErrListIsArchived) HTTPError() web.HTTPError {
|
|||
return web.HTTPError{HTTPCode: http.StatusPreconditionFailed, Code: ErrCodeListIsArchived, Message: "This list is archived. Editing or creating new tasks is not possible."}
|
||||
}
|
||||
|
||||
// ErrListCannotBelongToAPseudoNamespace represents an error where a list cannot belong to a pseudo namespace
|
||||
type ErrListCannotBelongToAPseudoNamespace struct {
|
||||
ListID int64
|
||||
NamespaceID int64
|
||||
}
|
||||
|
||||
// IsErrListCannotBelongToAPseudoNamespace checks if an error is a list is archived error.
|
||||
func IsErrListCannotBelongToAPseudoNamespace(err error) bool {
|
||||
_, ok := err.(*ErrListCannotBelongToAPseudoNamespace)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (err *ErrListCannotBelongToAPseudoNamespace) Error() string {
|
||||
return fmt.Sprintf("List cannot belong to a pseudo namespace [ListID: %d, NamespaceID: %d]", err.ListID, err.NamespaceID)
|
||||
}
|
||||
|
||||
// ErrCodeListCannotBelongToAPseudoNamespace holds the unique world-error code of this error
|
||||
const ErrCodeListCannotBelongToAPseudoNamespace = 3009
|
||||
|
||||
// HTTPError holds the http error description
|
||||
func (err *ErrListCannotBelongToAPseudoNamespace) HTTPError() web.HTTPError {
|
||||
return web.HTTPError{
|
||||
HTTPCode: http.StatusPreconditionFailed,
|
||||
Code: ErrCodeListCannotBelongToAPseudoNamespace,
|
||||
Message: "This list cannot belong a dynamically generated namespace.",
|
||||
}
|
||||
}
|
||||
|
||||
// ================
|
||||
// List task errors
|
||||
// ================
|
||||
|
|
|
@ -543,6 +543,10 @@ func (l *List) CheckIsArchived(s *xorm.Session) (err error) {
|
|||
}
|
||||
|
||||
func checkListBeforeUpdateOrDelete(s *xorm.Session, list *List) error {
|
||||
if list.NamespaceID < 0 {
|
||||
return &ErrListCannotBelongToAPseudoNamespace{ListID: list.ID, NamespaceID: list.NamespaceID}
|
||||
}
|
||||
|
||||
// Check if the namespace exists
|
||||
if list.NamespaceID > 0 {
|
||||
_, err := GetNamespaceByID(s, list.NamespaceID)
|
||||
|
|
|
@ -221,6 +221,25 @@ func TestList_CreateOrUpdate(t *testing.T) {
|
|||
assert.False(t, can) // namespace is not writeable by us
|
||||
_ = s.Close()
|
||||
})
|
||||
t.Run("pseudo namespace", func(t *testing.T) {
|
||||
usr := &user.User{
|
||||
ID: 6,
|
||||
Username: "user6",
|
||||
Email: "user6@example.com",
|
||||
}
|
||||
|
||||
db.LoadAndAssertFixtures(t)
|
||||
s := db.NewSession()
|
||||
list := List{
|
||||
ID: 6,
|
||||
Title: "Test6",
|
||||
Description: "Lorem Ipsum",
|
||||
NamespaceID: -1,
|
||||
}
|
||||
err := list.Update(s, usr)
|
||||
assert.Error(t, err)
|
||||
assert.True(t, IsErrListCannotBelongToAPseudoNamespace(err))
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
@ -214,6 +214,12 @@ func getNativeValueForTaskField(fieldName string, comparator taskFilterComparato
|
|||
return
|
||||
}
|
||||
|
||||
if realFieldName == "Assignees" {
|
||||
vals := strings.Split(value, ",")
|
||||
valueSlice := append([]string{}, vals...)
|
||||
return valueSlice, nil
|
||||
}
|
||||
|
||||
field, ok := reflect.TypeOf(&Task{}).Elem().FieldByName(realFieldName)
|
||||
if !ok {
|
||||
return nil, ErrInvalidTaskField{TaskField: fieldName}
|
||||
|
|
|
@ -934,10 +934,10 @@ func TestTaskCollection_ReadAll(t *testing.T) {
|
|||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "filter assignees",
|
||||
name: "filter assignees by username",
|
||||
fields: fields{
|
||||
FilterBy: []string{"assignees"},
|
||||
FilterValue: []string{"1"},
|
||||
FilterValue: []string{"user1"},
|
||||
FilterComparator: []string{"equals"},
|
||||
},
|
||||
args: defaultArgs,
|
||||
|
@ -947,12 +947,80 @@ func TestTaskCollection_ReadAll(t *testing.T) {
|
|||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "filter assignees in",
|
||||
name: "filter assignees by username with users field name",
|
||||
fields: fields{
|
||||
FilterBy: []string{"users"},
|
||||
FilterValue: []string{"user1"},
|
||||
FilterComparator: []string{"equals"},
|
||||
},
|
||||
args: defaultArgs,
|
||||
want: nil,
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "filter assignees by username with user_id field name",
|
||||
fields: fields{
|
||||
FilterBy: []string{"user_id"},
|
||||
FilterValue: []string{"user1"},
|
||||
FilterComparator: []string{"equals"},
|
||||
},
|
||||
args: defaultArgs,
|
||||
want: nil,
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "filter assignees by multiple username",
|
||||
fields: fields{
|
||||
FilterBy: []string{"assignees", "assignees"},
|
||||
FilterValue: []string{"user1", "user2"},
|
||||
FilterComparator: []string{"equals", "equals"},
|
||||
},
|
||||
args: defaultArgs,
|
||||
want: []*Task{
|
||||
task30,
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "filter assignees by numbers",
|
||||
fields: fields{
|
||||
FilterBy: []string{"assignees"},
|
||||
FilterValue: []string{"1"},
|
||||
FilterComparator: []string{"equals"},
|
||||
},
|
||||
args: defaultArgs,
|
||||
want: []*Task{},
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "filter assignees by name with like",
|
||||
fields: fields{
|
||||
FilterBy: []string{"assignees"},
|
||||
FilterValue: []string{"user"},
|
||||
FilterComparator: []string{"like"},
|
||||
},
|
||||
args: defaultArgs,
|
||||
want: []*Task{},
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "filter assignees in by id",
|
||||
fields: fields{
|
||||
FilterBy: []string{"assignees"},
|
||||
FilterValue: []string{"1,2"},
|
||||
FilterComparator: []string{"in"},
|
||||
},
|
||||
args: defaultArgs,
|
||||
want: []*Task{},
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "filter assignees in by username",
|
||||
fields: fields{
|
||||
FilterBy: []string{"assignees"},
|
||||
FilterValue: []string{"user1,user2"},
|
||||
FilterComparator: []string{"in"},
|
||||
},
|
||||
args: defaultArgs,
|
||||
want: []*Task{
|
||||
task30,
|
||||
|
|
|
@ -338,8 +338,11 @@ func getRawTasksForLists(s *xorm.Session, lists []*List, a web.Auth, opts *taskO
|
|||
continue
|
||||
}
|
||||
|
||||
if f.field == "assignees" || f.field == "user_id" {
|
||||
f.field = "user_id"
|
||||
if f.field == "assignees" {
|
||||
if f.comparator == taskFilterComparatorLike {
|
||||
return nil, 0, 0, ErrInvalidTaskFilterValue{Field: f.field, Value: f.value}
|
||||
}
|
||||
f.field = "username"
|
||||
filter, err := getFilterCond(f, opts.filterIncludeNulls)
|
||||
if err != nil {
|
||||
return nil, 0, 0, err
|
||||
|
@ -430,7 +433,13 @@ func getRawTasksForLists(s *xorm.Session, lists []*List, a web.Auth, opts *taskO
|
|||
}
|
||||
|
||||
if len(assigneeFilters) > 0 {
|
||||
filters = append(filters, getFilterCondForSeparateTable("task_assignees", opts.filterConcat, assigneeFilters))
|
||||
assigneeFilter := []builder.Cond{
|
||||
builder.In("user_id",
|
||||
builder.Select("id").
|
||||
From("users").
|
||||
Where(builder.Or(assigneeFilters...)),
|
||||
)}
|
||||
filters = append(filters, getFilterCondForSeparateTable("task_assignees", opts.filterConcat, assigneeFilter))
|
||||
}
|
||||
|
||||
if len(labelFilters) > 0 {
|
||||
|
|
|
@ -96,28 +96,15 @@ func ListUsersFromList(s *xorm.Session, l *List, search string) (users []*user.U
|
|||
uids = append(uids, id)
|
||||
}
|
||||
|
||||
var cond builder.Cond = builder.Like{"username", "%" + search + "%"}
|
||||
var cond builder.Cond
|
||||
|
||||
if len(uids) > 0 {
|
||||
cond = builder.And(
|
||||
builder.In("id", uids),
|
||||
cond,
|
||||
)
|
||||
}
|
||||
|
||||
// Get all users
|
||||
err = s.
|
||||
Table("users").
|
||||
Select("*").
|
||||
Where(cond).
|
||||
GroupBy("id").
|
||||
OrderBy("id").
|
||||
Find(&users)
|
||||
|
||||
// Obfuscate all user emails
|
||||
for _, u := range users {
|
||||
u.Email = ""
|
||||
cond = builder.In("id", uids)
|
||||
}
|
||||
|
||||
users, err = user.ListUsers(s, search, &user.ListUserOpts{
|
||||
AdditionalCond: cond,
|
||||
ReturnAllIfNoSearchProvided: true,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
|
|
@ -214,6 +214,13 @@ func TestListUsersFromList(t *testing.T) {
|
|||
testuser13, // Shared Via NamespaceUser admin
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "search for user1",
|
||||
args: args{l: &List{ID: 19, OwnerID: 7}, search: "user1"},
|
||||
wantUsers: []*user.User{
|
||||
testuser1, // Shared Via Team readonly
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
|
|
@ -17,10 +17,15 @@
|
|||
package handler
|
||||
|
||||
import (
|
||||
"image"
|
||||
_ "image/gif" // To make sure the decoder used for generating blurHashes recognizes gifs
|
||||
_ "image/jpeg" // To make sure the decoder used for generating blurHashes recognizes jpgs
|
||||
_ "image/png" // To make sure the decoder used for generating blurHashes recognizes pngs
|
||||
|
||||
_ "golang.org/x/image/bmp" // To make sure the decoder used for generating blurHashes recognizes bmps
|
||||
_ "golang.org/x/image/tiff" // To make sure the decoder used for generating blurHashes recognizes tiffs
|
||||
_ "golang.org/x/image/webp" // To make sure the decoder used for generating blurHashes recognizes tiffs
|
||||
|
||||
"image"
|
||||
"io"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
|
|
@ -47,7 +47,7 @@ func UserList(c echo.Context) error {
|
|||
s := db.NewSession()
|
||||
defer s.Close()
|
||||
|
||||
users, err := user.ListUsers(s, search)
|
||||
users, err := user.ListUsers(s, search, nil)
|
||||
if err != nil {
|
||||
_ = s.Rollback()
|
||||
return handler.HandleHTTPError(err, c)
|
||||
|
|
|
@ -49,6 +49,7 @@ package routes
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
@ -209,6 +210,25 @@ func registerAPIRoutes(a *echo.Group) {
|
|||
n := a.Group("")
|
||||
setupRateLimit(n, "ip")
|
||||
|
||||
// Echo does not unescape url path params by default. To make sure values bound as :param in urls are passed
|
||||
// properly to handlers, we use this middleware to unescape them.
|
||||
// See https://kolaente.dev/vikunja/api/issues/1224
|
||||
// See https://github.com/labstack/echo/issues/766
|
||||
a.Use(func(next echo.HandlerFunc) echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
params := make([]string, 0, len(c.ParamValues()))
|
||||
for _, param := range c.ParamValues() {
|
||||
p, err := url.PathUnescape(param)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
params = append(params, p)
|
||||
}
|
||||
c.SetParamValues(params...)
|
||||
return next(c)
|
||||
}
|
||||
})
|
||||
|
||||
// Docs
|
||||
n.GET("/docs.json", apiv1.DocsJSON)
|
||||
n.GET("/docs", apiv1.RedocUI)
|
||||
|
|
|
@ -20,7 +20,9 @@ import (
|
|||
"testing"
|
||||
|
||||
"code.vikunja.io/api/pkg/db"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"xorm.io/builder"
|
||||
)
|
||||
|
||||
func TestCreateUser(t *testing.T) {
|
||||
|
@ -362,7 +364,7 @@ func TestListUsers(t *testing.T) {
|
|||
s := db.NewSession()
|
||||
defer s.Close()
|
||||
|
||||
all, err := ListUsers(s, "user1")
|
||||
all, err := ListUsers(s, "user1", nil)
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, len(all) > 0)
|
||||
assert.Equal(t, all[0].Username, "user1")
|
||||
|
@ -381,7 +383,7 @@ func TestListUsers(t *testing.T) {
|
|||
s := db.NewSession()
|
||||
defer s.Close()
|
||||
|
||||
all, err := ListUsers(s, "")
|
||||
all, err := ListUsers(s, "", nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, all, 0)
|
||||
})
|
||||
|
@ -390,11 +392,12 @@ func TestListUsers(t *testing.T) {
|
|||
s := db.NewSession()
|
||||
defer s.Close()
|
||||
|
||||
all, err := ListUsers(s, "user1@example.com")
|
||||
all, err := ListUsers(s, "user1@example.com", nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, all, 0)
|
||||
db.AssertExists(t, "users", map[string]interface{}{
|
||||
"email": "user1@example.com",
|
||||
"email": "user1@example.com",
|
||||
"discoverable_by_email": false,
|
||||
}, false)
|
||||
})
|
||||
t.Run("not discoverable by name", func(t *testing.T) {
|
||||
|
@ -402,11 +405,12 @@ func TestListUsers(t *testing.T) {
|
|||
s := db.NewSession()
|
||||
defer s.Close()
|
||||
|
||||
all, err := ListUsers(s, "one else")
|
||||
all, err := ListUsers(s, "one else", nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, all, 0)
|
||||
db.AssertExists(t, "users", map[string]interface{}{
|
||||
"name": "Some one else",
|
||||
"name": "Some one else",
|
||||
"discoverable_by_name": false,
|
||||
}, false)
|
||||
})
|
||||
t.Run("discoverable by email", func(t *testing.T) {
|
||||
|
@ -414,20 +418,67 @@ func TestListUsers(t *testing.T) {
|
|||
s := db.NewSession()
|
||||
defer s.Close()
|
||||
|
||||
all, err := ListUsers(s, "user7@example.com")
|
||||
all, err := ListUsers(s, "user7@example.com", nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, all, 1)
|
||||
assert.Equal(t, int64(7), all[0].ID)
|
||||
db.AssertExists(t, "users", map[string]interface{}{
|
||||
"email": "user7@example.com",
|
||||
"discoverable_by_email": true,
|
||||
}, false)
|
||||
})
|
||||
t.Run("discoverable by partial name", func(t *testing.T) {
|
||||
db.LoadAndAssertFixtures(t)
|
||||
s := db.NewSession()
|
||||
defer s.Close()
|
||||
|
||||
all, err := ListUsers(s, "with space")
|
||||
all, err := ListUsers(s, "with space", nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, all, 1)
|
||||
assert.Equal(t, int64(12), all[0].ID)
|
||||
db.AssertExists(t, "users", map[string]interface{}{
|
||||
"name": "Name with spaces",
|
||||
"discoverable_by_name": true,
|
||||
}, false)
|
||||
})
|
||||
t.Run("discoverable by email with extra condition", func(t *testing.T) {
|
||||
db.LoadAndAssertFixtures(t)
|
||||
s := db.NewSession()
|
||||
defer s.Close()
|
||||
|
||||
all, err := ListUsers(s, "user7@example.com", &ListUserOpts{AdditionalCond: builder.In("id", 7)})
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, all, 1)
|
||||
assert.Equal(t, int64(7), all[0].ID)
|
||||
db.AssertExists(t, "users", map[string]interface{}{
|
||||
"email": "user7@example.com",
|
||||
"discoverable_by_email": true,
|
||||
}, false)
|
||||
})
|
||||
t.Run("discoverable by exact username", func(t *testing.T) {
|
||||
db.LoadAndAssertFixtures(t)
|
||||
s := db.NewSession()
|
||||
defer s.Close()
|
||||
|
||||
all, err := ListUsers(s, "user7", nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, all, 1)
|
||||
assert.Equal(t, int64(7), all[0].ID)
|
||||
db.AssertExists(t, "users", map[string]interface{}{
|
||||
"username": "user7",
|
||||
}, false)
|
||||
})
|
||||
t.Run("not discoverable by partial username", func(t *testing.T) {
|
||||
db.LoadAndAssertFixtures(t)
|
||||
s := db.NewSession()
|
||||
defer s.Close()
|
||||
|
||||
all, err := ListUsers(s, "user", nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, all, 0)
|
||||
db.AssertExists(t, "users", map[string]interface{}{
|
||||
"username": "user7",
|
||||
}, false)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -23,29 +23,58 @@ import (
|
|||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
// ListUsers returns a list with all users, filtered by an optional searchstring
|
||||
func ListUsers(s *xorm.Session, search string) (users []*User, err error) {
|
||||
type ListUserOpts struct {
|
||||
AdditionalCond builder.Cond
|
||||
ReturnAllIfNoSearchProvided bool
|
||||
}
|
||||
|
||||
// ListUsers returns a list with all users, filtered by an optional search string
|
||||
func ListUsers(s *xorm.Session, search string, opts *ListUserOpts) (users []*User, err error) {
|
||||
if opts == nil {
|
||||
opts = &ListUserOpts{}
|
||||
}
|
||||
|
||||
// Prevent searching for placeholders
|
||||
search = strings.ReplaceAll(search, "%", "")
|
||||
|
||||
if search == "" || strings.ReplaceAll(search, " ", "") == "" {
|
||||
if (search == "" || strings.ReplaceAll(search, " ", "") == "") && !opts.ReturnAllIfNoSearchProvided {
|
||||
return
|
||||
}
|
||||
|
||||
conds := []builder.Cond{}
|
||||
|
||||
if search != "" {
|
||||
for _, queryPart := range strings.Split(search, ",") {
|
||||
conds = append(conds,
|
||||
builder.Eq{"username": queryPart},
|
||||
builder.And(
|
||||
builder.Eq{"email": queryPart},
|
||||
builder.Eq{"discoverable_by_email": true},
|
||||
),
|
||||
builder.And(
|
||||
builder.Like{"name", "%" + queryPart + "%"},
|
||||
builder.Eq{"discoverable_by_name": true},
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
cond := builder.Or(conds...)
|
||||
|
||||
if opts.AdditionalCond != nil {
|
||||
cond = builder.And(
|
||||
cond,
|
||||
opts.AdditionalCond,
|
||||
)
|
||||
}
|
||||
|
||||
err = s.
|
||||
Where(builder.Or(
|
||||
builder.Like{"username", "%" + search + "%"},
|
||||
builder.And(
|
||||
builder.Eq{"email": search},
|
||||
builder.Eq{"discoverable_by_email": true},
|
||||
),
|
||||
builder.And(
|
||||
builder.Like{"name", "%" + search + "%"},
|
||||
builder.Eq{"discoverable_by_name": true},
|
||||
),
|
||||
)).
|
||||
Where(cond).
|
||||
Find(&users)
|
||||
|
||||
for _, u := range users {
|
||||
u.Email = ""
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue