Compare commits

...

458 Commits

Author SHA1 Message Date
18111dd9da
fix: lint 2023-09-01 16:51:04 +02:00
1c296b6148
fix(api tokens): lint 2023-09-01 16:51:04 +02:00
1156bc37bf
fix(api tokens): test 2023-09-01 16:51:04 +02:00
60648c72d1
chore(api tokens): add swagger docs about api token auth 2023-09-01 16:51:04 +02:00
a343aa9738
fix(api tokens): make sure read one routes show up in routes endpoint 2023-09-01 16:51:04 +02:00
68d6b3c8fb
chore(api tokens): remove updated date from tokens as it can't be updated anyway 2023-09-01 16:51:04 +02:00
b1a3310b98
feat(api tokens): better error message for invalid tokens 2023-09-01 16:51:04 +02:00
a4be4e17a0
feat(api tokens): move token validation middleware to new function 2023-09-01 16:51:03 +02:00
d8d3ab0977
feat(api tokens): add tests 2023-09-01 16:51:03 +02:00
6915a24012
feat(api tokens): check permissions when saving 2023-09-01 16:51:03 +02:00
3875c5d104
fix: lint 2023-09-01 16:51:03 +02:00
1f79aebdd0
feat(api tokens): check for scopes 2023-09-01 16:51:03 +02:00
88421556db
feat(api tokens): check for expiry date 2023-09-01 16:51:03 +02:00
a1bc326ebf
feat(api tokens): check if a provided token matched a hashed on in the database 2023-09-01 16:51:03 +02:00
a485d56805
feat(api tokens): properly hash tokens 2023-09-01 16:51:02 +02:00
9926eab036
feat(api tokens): add crud routes to manage api tokens 2023-09-01 16:51:02 +02:00
b3a9c72821
feat(api tokens): add api token struct and migration 2023-09-01 16:51:02 +02:00
956d137e33
feat: endpoint to get all token routes 2023-09-01 16:51:02 +02:00
d83034ede6
fix(kanban): don't prevent setting a different bucket as done bucket
Resolves vikunja/frontend#3373
2023-09-01 16:51:02 +02:00
63ca453a24
fix(task): remove task relation in the other direction as well
Resolves https://community.vikunja.io/t/removing-parent-relationship-doesnt-remove-the-subtask-relationship/1492/3
2023-09-01 16:51:02 +02:00
019733ff95
chore: remove year from copyright headers
Resolves vikunja/api#1483
2023-09-01 16:51:01 +02:00
5601374b29
fix: order by clause in task comments 2023-09-01 16:51:01 +02:00
c1fcdf1a0f
fix(comments): make sure comment sort order is stable
Resolves https://community.vikunja.io/t/comment-order-is-not-by-time/1147/3?u=kolaente
2023-09-01 16:51:01 +02:00
8250edce3d
fix(filter): assignee search by partial username test 2023-09-01 16:51:01 +02:00
f4649fd2f2
fix: lint 2023-09-01 16:51:01 +02:00
ef54b7c86e
feat(docs): update sample config and docs about Typesense config 2023-09-01 16:51:01 +02:00
ae623594db
fix(filters): make "in" filter comparator work with Typesense 2023-09-01 16:51:00 +02:00
9b0e1c4acd
feat(tasks): allow filtering for reminders, assignees and labels with Typesense 2023-09-01 16:51:00 +02:00
35f92b15a5
feat(tasks): find tasks by their identifier when searching with Typesense 2023-09-01 16:51:00 +02:00
5ac2a5cd59
feat(tasks): make sorting and filtering work with Typesense 2023-09-01 16:51:00 +02:00
8e88b313d4
feat(tasks): remove deleted tasks from Typesense 2023-09-01 16:51:00 +02:00
6bd9c90788
feat(tasks): add periodic resync of updated tasks to Typesense 2023-09-01 16:51:00 +02:00
9582e981f0
feat(tasks): add searching via typesense 2023-09-01 16:51:00 +02:00
095e0718ec
feat(tasks): add typesense indexing 2023-09-01 16:50:59 +02:00
2ead4b64d6
fix(user): don't prevent deleting a user if their default project was shared
Resolves vikunja/api#1595
2023-09-01 16:50:59 +02:00
5866016ebc
chore: migration improvments 2023-09-01 16:32:09 +02:00
edel
9fa905e220 fix(kanban): Created migration to create a default bucket for projects that do not already have any buckets 2023-08-24 16:35:25 -06:00
edel
ebca8abd30 fix(kanban): create stub migration file for bucket creation 2023-08-24 13:27:06 -06:00
49d8713388
fix: typo 2023-08-24 11:16:07 +02:00
1b9c4204a8
fix(reminders): make sure reminders are only sent once per user
Previously, when a user was creator and assigned to a task, they would get two reminder notifications for the same task. This was caused by Vikunja first fetching all creators and then all assignees and not removing duplicates from that list.

Related: https://community.vikunja.io/t/duplicate-email-reminders/1505/3
2023-08-24 10:47:17 +02:00
5e8084c194
fix(project): duplicating a project should not create two backlog buckets
Resolves https://community.vikunja.io/t/when-duplicating-a-project-the-resulting-project-has-an-extra-bucket/1524
2023-08-23 16:19:42 +02:00
acb03c430e
fix(user): allow deleting a user if they have a default project
Resolves https://github.com/go-vikunja/api/issues/78
2023-08-23 16:10:51 +02:00
40037f25f2
fix(user): don't crash when attempting to change a user's password
Resolves vikunja/api#1587
Resolves https://github.com/go-vikunja/api/issues/79
2023-08-23 15:56:18 +02:00
665c046717 docs: Add Caddyfile to reverse proxies setup (#1580)
Reviewed-on: vikunja/api#1580
Co-authored-by: cr1xus <christoearth@gmail.com>
Co-committed-by: cr1xus <christoearth@gmail.com>
2023-08-21 11:45:35 +00:00
2081852004 fix(deps): update module github.com/arran4/golang-ical to v0.1.0 2023-08-21 10:57:54 +00:00
69451d14a6 fix(deps): update module github.com/getsentry/sentry-go to v0.23.0 2023-08-21 10:57:45 +00:00
3523325663 fix(deps): update module golang.org/x/image to v0.11.0 2023-08-04 21:02:14 +00:00
f07adb5edd fix(deps): update module xorm.io/builder to v0.3.13 2023-07-20 11:02:05 +00:00
1647282f0b fix(deps): update module github.com/labstack/echo/v4 to v4.11.1 2023-07-16 18:01:45 +00:00
e42278f93f fix(deps): update module github.com/labstack/echo/v4 to v4.11.0 2023-07-14 21:01:48 +00:00
4c04a7bd5f fix(deps): update module github.com/iancoleman/strcase to v0.3.0 2023-07-13 01:02:01 +00:00
d913edbcb6 fix(deps): update src.techknowlogick.com/xgo digest to 617d3b6 2023-07-11 19:02:02 +00:00
adbc1d2997 fix(deps): update module github.com/wneessen/go-mail to v0.4.0 2023-07-08 12:02:02 +00:00
e5cd4897d6
chore: release preparation 2023-07-07 13:34:22 +02:00
86f25f253b
fix(project): duplicate project into parent project 2023-07-07 12:56:15 +02:00
9f3787bf20 fix(deps): update module golang.org/x/oauth2 to v0.10.0 2023-07-05 22:02:03 +00:00
142dacecc0
chore(docs): update list -> project 2023-07-05 17:50:35 +02:00
9b016c6b07 fix(deps): update module golang.org/x/crypto to v0.11.0 2023-07-05 14:01:58 +00:00
d5e8c586b2 fix(deps): update module golang.org/x/term to v0.10.0 2023-07-05 13:44:28 +00:00
d39af7ac57 fix(deps): update module golang.org/x/image to v0.9.0 2023-07-05 13:01:56 +00:00
e3dc8ac65a fix(deps): update module golang.org/x/sys to v0.10.0 2023-07-04 16:01:50 +00:00
b5194624e0
fix: don't try to load subscriptions for nonexistent projects 2023-07-03 18:18:13 +02:00
32689531ec
chore(docs): move login and register routes to auth category in api docs 2023-07-03 18:10:01 +02:00
117c569721
fix(projects): return subprojects which were shared from another user 2023-07-03 11:45:29 +02:00
24c2fad77f fix(deps): update github.com/dustinkirkland/golang-petname digest to e794b93 2023-06-26 23:01:59 +00:00
ef779e8730
fix: lint 2023-06-26 19:10:32 +02:00
895263f054
fix(filters): sorting tasks from filters
Resolves https://community.vikunja.io/t/filter-table-view-not-sorting/1416
2023-06-21 14:59:40 +02:00
1dc9c50d64 fix(deps): update module github.com/imdario/mergo to v1 (#1559)
Reviewed-on: vikunja/api#1559
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-06-20 10:02:21 +00:00
6fa760545c fix(deps): update github.com/gocarina/gocsv digest to 99d496c 2023-06-16 13:02:28 +00:00
104461c40b fix(deps): update module github.com/getsentry/sentry-go to v0.22.0 2023-06-16 11:02:27 +00:00
0a97a7d862 fix(deps): update module github.com/prometheus/client_golang to v1.16.0 2023-06-15 11:02:26 +00:00
78cd711002 fix(deps): update github.com/gocarina/gocsv digest to 2696de6 2023-06-14 21:21:20 +00:00
e938c3d075 fix(deps): update module golang.org/x/sync to v0.3.0 2023-06-14 16:02:28 +00:00
b68315240a fix(deps): update module golang.org/x/oauth2 to v0.9.0 2023-06-13 15:02:24 +00:00
3aa493d64f fix(deps): update module golang.org/x/crypto to v0.10.0 2023-06-13 12:02:21 +00:00
78866fad45 fix(deps): update module golang.org/x/image to v0.8.0 2023-06-13 07:02:21 +00:00
d27474d525 fix(deps): update module golang.org/x/term to v0.9.0 2023-06-12 19:02:35 +00:00
05998f0cc9 fix(deps): update module golang.org/x/sys to v0.9.0 2023-06-12 18:02:31 +00:00
04e2c51fac
feat: allow saving frontend settings via api 2023-06-11 17:49:14 +02:00
cernst
4a4ba041e0 chore: remove reminderDates after frontend is migrated to reminders (#1448)
Co-authored-by: ce72 <christoph.ernst72@googlemail.com>
Reviewed-on: vikunja/api#1448
Reviewed-by: konrad <k@knt.li>
Co-authored-by: cernst <ce72@noreply.kolaente.de>
Co-committed-by: cernst <ce72@noreply.kolaente.de>
2023-06-10 17:21:36 +00:00
d83e3a0a03
chore: remove cache options
Cache was not working correctly, added more complexity and actually made response times slower. Because of this, I'm removing all cache options until we figure out a better solution.

Resolves vikunja/api#1496
Resolves vikunja/api#907
2023-06-08 17:05:36 +02:00
72e0e22152
feat(kanban): return the total task count per bucket 2023-06-08 16:56:05 +02:00
ef94e0cf86
feat(projects): don't allow deleting or archiving the default project 2023-06-07 21:29:46 +02:00
ad0690369f
fix: lint 2023-06-07 21:00:12 +02:00
ebfb3f9aaa
fix(filter): don't try to get the real subscription for a saved filter project 2023-06-07 20:41:59 +02:00
4ed2d305f0
fix(task): don't build partial task identifier 2023-06-07 20:33:18 +02:00
7b7a914560
fix(test): use correct filter id 2023-06-07 20:30:28 +02:00
43ef5f98d8
fix(projects): don't fail to fetch a task if there's a broken subscription record associated to it 2023-06-07 20:30:14 +02:00
e66344c21e
fix(task): don't try to return a project identifier if there is no project 2023-06-07 20:29:35 +02:00
7755b9cd49
fix(projects): delete project in the correct order 2023-06-07 20:28:36 +02:00
67825425a4
fix(filters): return all filters with all projects, not grouped under a pseudo project 2023-06-07 18:55:36 +02:00
69bd023b62
fix(tasks): return a correct task identifier if the list does not have a good one set 2023-06-07 18:17:08 +02:00
1a840c8b87
fix(tasks): make sure task deleted notification actually has information about the deleted task 2023-06-07 18:14:20 +02:00
456495ec30 chore(deps): update goreleaser/nfpm docker tag to v2.30.1 (#1540)
Reviewed-on: vikunja/api#1540
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-06-07 15:05:05 +00:00
b461ce1443 fix(deps): update src.techknowlogick.com/xgo digest to 494bc06 2023-06-06 19:02:42 +00:00
b03213c19e chore(deps): update klakegg/hugo docker tag to v0.111.3 (#1542)
Reviewed-on: vikunja/api#1542
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-06-06 18:17:47 +00:00
e3842b6df7
fix(projects): reset pagination limit when fetching subprojects 2023-06-06 17:24:27 +02:00
a86518da71 chore(deps): update klakegg/hugo docker tag to v0.111.0 (#1539)
Reviewed-on: vikunja/api#1539
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-06-05 18:20:32 +00:00
e17b63b920
fix: lint 2023-06-05 19:14:26 +02:00
076e857507
chore: disable false-positive linter for generated docs 2023-06-05 18:56:27 +02:00
d758bdc5e2
fix(projects): don't try to share for nonexisting namespace 2023-06-05 18:12:12 +02:00
50b0d3f95c
chore(deps): update golangci 2023-06-05 18:07:12 +02:00
96620ce946 chore(deps): update klakegg/hugo docker tag to v0.110.0 (#1538)
Reviewed-on: vikunja/api#1538
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-06-05 14:23:32 +00:00
374cc02399 fix(deps): update module github.com/mattn/go-sqlite3 to v1.14.17 2023-06-01 00:01:57 +00:00
d68338b649
fix(docs): clarify error codes in swagger docs
Resolves vikunja/api#1518
2023-05-30 21:37:40 +02:00
8c3ef34f75 fix(deps): update github.com/vectordotdev/go-datemath digest to 640a500 (#1532)
Reviewed-on: vikunja/api#1532
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-05-30 18:11:31 +00:00
b56e45d743
fix: use rewrite when hosting frontend files via the api
Resolves vikunja/api#1531
2023-05-30 18:56:37 +02:00
adc9998b19 fix(deps): update module github.com/spf13/viper to v1.16.0 2023-05-30 11:02:13 +00:00
4ac4dbdaa9 fix(deps): update module github.com/stretchr/testify to v1.8.4 2023-05-30 10:01:56 +00:00
5f06117167 fix(deps): update module github.com/imdario/mergo to v0.3.16 2023-05-30 07:51:43 +00:00
a82192080b fix(deps): update module github.com/redis/go-redis/v9 to v9.0.5 2023-05-29 07:01:41 +00:00
82beb3bf67 feat: remove namespaces, make projects infinitely nestable (#1362)
Reviewed-on: vikunja/api#1362
2023-05-24 14:14:02 +00:00
e5dde315fb
chore: go mod tidy 2023-05-24 15:53:29 +02:00
a51bbd1159
fix: don't get favorite task projects filter multiple times 2023-05-24 15:52:33 +02:00
4b00f224d9
fix: reminder fixture 2023-05-24 15:52:33 +02:00
db3c7aa8b0
fix: make sure projects are correctly sorted 2023-05-24 15:52:33 +02:00
353279cbff
fix: fetch all tasks for all projects 2023-05-24 15:52:33 +02:00
3b0935d033
docs: remove all traces of namespaces 2023-05-24 15:52:33 +02:00
9011894a29
feat: check for cycles when creating or updating a project's parent 2023-05-24 15:52:33 +02:00
edcb806421
feat: remove ChildProjects project property 2023-05-24 15:52:33 +02:00
f2d943f5c4
fix: add missing error code 2023-05-24 15:52:33 +02:00
35964ce4a6
fix(projects): recalculate project's position after dragging when position would be 0 2023-05-24 15:52:33 +02:00
a8b76772ff
fix(migration): revert wrongly changed url 2023-05-24 15:52:33 +02:00
53b2ade5bb
feat(projects): return a favorites pseudo project when the user has favorite tasks 2023-05-24 15:52:32 +02:00
b482664d82
fix(projects): don't allow making a project child of itself 2023-05-24 15:52:32 +02:00
aafcb0bac4
fix(projects): don't return child projects twice 2023-05-24 15:52:32 +02:00
0110f93313
feat: make the new inbox project the default 2023-05-24 15:52:32 +02:00
9111db2a16
fix: lint config 2023-05-24 15:52:32 +02:00
f1cbe50605
fix: rename project receiver variable 2023-05-24 15:52:32 +02:00
746ac1098f
fix(test): adjust fixture bucket and list ids 2023-05-24 15:52:32 +02:00
d7396fac57
fix(test): adjust fixture id 2023-05-24 15:52:32 +02:00
3b00a5c200
fix(test): fixtures 2023-05-24 15:52:32 +02:00
a21bff3ffb
fix: compile errors 2023-05-24 15:52:32 +02:00
93056da792
chore: go mod tidy 2023-05-24 15:52:30 +02:00
ebc3dd2b3e
fix: lint errors 2023-05-24 15:51:57 +02:00
017f771783
chore(test): show table content when db assertion failed 2023-05-24 15:51:56 +02:00
abe5f72493
fix(migration): enable insert from structure work recursively 2023-05-24 15:51:56 +02:00
4b55e2ce03
fix(migration): make file migration work with new structure 2023-05-24 15:51:56 +02:00
2f81791735
chore(export): remove unused events 2023-05-24 15:51:56 +02:00
8235c63f60
fix(tests): task collection fixtures 2023-05-24 15:51:56 +02:00
03b7fa6dd3
fix(tests): subscription test fixtures 2023-05-24 15:51:56 +02:00
5e6bff20f8
fix(tests): task permissions from parents 2023-05-24 15:51:56 +02:00
8e56fe558a
fix(tests): adjust parent projects 2023-05-24 15:51:56 +02:00
154ac61d7c
fix(projects): properly check if a user or link share is allowed to create a new project 2023-05-24 15:51:56 +02:00
03eb4ecd07
fix(tests): permission tests for parent projects 2023-05-24 15:51:56 +02:00
d4e644e91e
chore(project): fmt 2023-05-24 15:51:56 +02:00
48beb5f382
fix(project): don't allow un-archiving a project when its parent project is archived 2023-05-24 15:51:56 +02:00
0cd633981a
fix(project): recursively get all users from all parent projects 2023-05-24 15:51:56 +02:00
19f69419f7
fix(tasks): task relation test 2023-05-24 15:51:55 +02:00
6bb42ced9d
fix(tasks): read all tests 2023-05-24 15:51:55 +02:00
3b837a472b
fix(migration): remove wunderlist leftovers 2023-05-24 15:51:55 +02:00
537ba60f2d
fix(tasks): get all tasks from parent projects 2023-05-24 15:51:55 +02:00
ceaa9c0e03
feat(subscriptions): make sure all subscriptions are inherited properly 2023-05-24 15:51:55 +02:00
afe756e4c1
fix(tests): make the tests compile again 2023-05-24 15:51:55 +02:00
f4fc431b6f
fix(projects): permission check now works 2023-05-24 15:51:55 +02:00
438f5c8e12
fix(projects): don't check if new projects are archived 2023-05-24 15:51:55 +02:00
3e8d1b3667
chore(projects) use a slice again 2023-05-24 15:51:55 +02:00
01723148e8
chore(docs): update error docs 2023-05-24 15:51:55 +02:00
18b9ff8512
feat(projects): check parent project when checking archived status 2023-05-24 15:51:55 +02:00
5e2567645a
feat(projects): check all parent projects for permissions 2023-05-24 15:51:55 +02:00
d799915e78
feat(projects): get all projects recursively 2023-05-24 15:51:55 +02:00
4c698dc7c7
fix: typo 2023-05-24 15:51:55 +02:00
e93a5ff11f
fix: rename after rebase 2023-05-24 15:51:54 +02:00
d79c393e5b
fix: make it compile again 2023-05-24 15:51:54 +02:00
5d02d93d31
fix(tasks): don't check for namespaces in filters 2023-05-24 15:51:54 +02:00
7c448c88a8
fix(project): don't check for namespaces in overdue reminders 2023-05-24 15:51:54 +02:00
906574adc9
fix(project): remove comments, clarifications, notifications about namespaces 2023-05-24 15:51:54 +02:00
d794a2c5ca
fix(project): remove namespaces checks 2023-05-24 15:51:54 +02:00
8cff813e9f
fix(project): remove namespaces from creating projects 2023-05-24 15:51:54 +02:00
2dcd6451a4
fix(project): remove namespaces from getting projects 2023-05-24 15:51:54 +02:00
ac0d84a7d8
feat(migration): ignore namespace changes 2023-05-24 15:51:54 +02:00
386e218b95
feat(migration): use new structure for migration 2023-05-24 15:51:54 +02:00
fef253312c
feat(projects): cleanup namespace leftovers 2023-05-24 15:51:54 +02:00
16de7cd591
feat(projects): remove namespaces 2023-05-24 15:51:54 +02:00
0795828a9f
feat(projects): add parent project, migrate namespaces 2023-05-24 15:51:54 +02:00
47c2da7f18
feat: rename lists to projects 2023-05-24 15:51:53 +02:00
fc73c84bf2
feat: rename lists to projects 2023-05-24 15:51:53 +02:00
87ed68e4c8
fix(migration): remove wunderlist leftovers 2023-05-24 15:51:53 +02:00
50c922b7d1
fix: lint 2023-05-24 15:51:53 +02:00
96a0f5e169
feat: rename lists to projects 2023-05-24 15:51:53 +02:00
73244e7d85 fix(deps): update module github.com/ulule/limiter/v3 to v3.11.2 2023-05-24 10:21:37 +00:00
f2d5220625 chore(deps): update goreleaser/nfpm docker tag to v2.29.0 (#1528)
Reviewed-on: vikunja/api#1528
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-05-24 10:04:54 +00:00
359d0512cc
fix: upgrade jwt v5 2023-05-23 16:37:16 +02:00
9e5c95fd6d fix(docs): Added Keycloak OpenID example (#1521)
Reviewed-on: vikunja/api#1521
Reviewed-by: konrad <k@knt.li>
Co-authored-by: jontyms <jontyms@protonmail.com>
Co-committed-by: jontyms <jontyms@protonmail.com>
2023-05-23 11:14:35 +00:00
20269de2d4 fix(deps): update module github.com/labstack/echo-jwt/v4 to v4.2.0 2023-05-23 11:13:41 +00:00
e38e6698c5 fix(deps): update module github.com/stretchr/testify to v1.8.3 2023-05-23 11:13:23 +00:00
18ad91e3e2 fix(deps): update module github.com/coreos/go-oidc/v3 to v3.6.0 2023-05-16 19:01:57 +00:00
9cff96204b fix(deps): update github.com/gocarina/gocsv digest to 9ddd7fd 2023-05-13 23:02:05 +00:00
513ccc08e3 fix(deps): update module github.com/magefile/mage to v1.15.0 2023-05-11 16:01:42 +00:00
7d9e8bd150
fix(cli): rename user project command 2023-05-10 22:37:37 +02:00
cade124799 fix(deps): update github.com/gocarina/gocsv digest to 7f30c79 2023-05-10 10:02:06 +00:00
9e5cfb6fd6 chore(deps): update alpine docker tag to v3.18 2023-05-10 00:01:24 +00:00
340c888dc1 fix(deps): update module golang.org/x/crypto to v0.9.0 2023-05-09 08:01:40 +00:00
abd67dc14a fix(deps): update module golang.org/x/oauth2 to v0.8.0 2023-05-09 04:01:56 +00:00
949e52e58c fix(deps): update module github.com/getsentry/sentry-go to v0.21.0 2023-05-08 15:01:49 +00:00
7d8c42ab98
fix(migration): remove unused is_deleted flag from Todoist api response
Related discussion: https://community.vikunja.io/t/importing-tasks-from-todoist/322
2023-05-08 15:32:27 +02:00
9c66b473dd fix(deps): update module golang.org/x/sync to v0.2.0 2023-05-04 21:01:44 +00:00
0000f83592
Revert "fix(deps): update module github.com/swaggo/swag to v1.16.1"
This reverts commit eedc84b5a0.
2023-05-04 22:31:55 +02:00
eedc84b5a0 fix(deps): update module github.com/swaggo/swag to v1.16.1 2023-05-04 20:31:12 +00:00
0c4464ae1e fix(deps): update src.techknowlogick.com/xgo digest to 52d704d 2023-05-04 20:31:04 +00:00
7d78fddeeb fix(deps): update module golang.org/x/term to v0.8.0 2023-05-04 17:01:46 +00:00
f3fb369e6b fix(deps): update module github.com/prometheus/client_golang to v1.15.1 2023-05-03 10:01:42 +00:00
c74bf0d33e fix(deps): update module github.com/go-testfixtures/testfixtures/v3 to v3.9.0 2023-05-02 07:18:27 +00:00
414d827533 fix(deps): update module github.com/redis/go-redis/v9 to v9.0.4 2023-05-02 06:01:37 +00:00
a3dd9db54d fix(deps): update github.com/arran4/golang-ical digest to f69e132 2023-04-26 06:13:24 +00:00
f50b0b342a fix(deps): update src.techknowlogick.com/xgo digest to e65295a 2023-04-26 06:12:18 +00:00
0c3d2d4bf1 fix(deps): update module github.com/lib/pq to v1.10.9 2023-04-26 05:01:44 +00:00
bd046d98ba fix(deps): update module github.com/go-sql-driver/mysql to v1.7.1 2023-04-25 11:01:45 +00:00
7ad256f6cd
fix: correctly pass unix socket to xorm 2023-04-17 19:39:38 +02:00
0a6bbc2efd fix: using mysql via a socket 2023-04-17 10:48:59 +00:00
efa1dc3106 fix(deps): update module github.com/lib/pq to v1.10.8 2023-04-17 09:12:34 +00:00
aa43127e52
fix: provide a proper error message when viewing a link share with an invalid token 2023-04-17 11:08:38 +02:00
10f71c29b2
fix(saved filters): don't let query parameters override saved sorting parameters
Resolves vikunja/frontend#3380
2023-04-14 11:01:31 +02:00
2dad404217
fix: typo in email template 2023-04-14 10:29:54 +02:00
b961119517 fix(deps): update module github.com/prometheus/client_golang to v1.15.0 2023-04-13 12:01:50 +00:00
Aaron Ogle
a16fd67b51
docs: add docs for installing with sqlite in docker (#70)
Co-authored-by: kolaente <k@knt.li>
Reviewed-On: https://github.com/go-vikunja/api/pull/70
2023-04-13 11:42:15 +02:00
6816f041a1
chore(docs/translation): remove mention of weblate 2023-04-13 11:28:03 +02:00
aaa0593289 feat(docs): various improvements
- removing spaces at end of line
- fixing spelling and grammar mistakes
- making sure 'Vikunja' is spelled the same way everywhere
- prefer using editors word wrap instead of hardcoding word wrap in markdown (reason: different word wrap per editor & end of line space)
- add newline add end where missing
- remove double colon at end of headlines
- remove unnecessary indention
- make sure code blocks and headlines etc always have an empty line around
2023-04-11 16:42:59 +00:00
Dominik Pschenitschni
6cbaf5bbf9 fix(spelling): in config sample (#1489)
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1489
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
2023-04-11 16:42:41 +00:00
1e73462f79
chore(changelog): fix spelling 2023-04-11 14:17:41 +02:00
Dominik Pschenitschni
8d7825171f fix(docs): semver link (#1470)
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: vikunja/api#1470
Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
2023-04-11 12:09:12 +00:00
eb3b4e9ed9 fix(CalDAV): naming 2023-04-11 11:21:40 +00:00
5856f21f31
chore: fix comment url 2023-04-11 11:40:06 +02:00
9bf535d06f
fix: remove old saved openid provider settings from cache when starting Vikunja
Resolves vikunja/api#1487
2023-04-10 13:32:20 +02:00
4decbf9fc4 fix(deps): update module golang.org/x/crypto to v0.8.0 2023-04-07 12:57:56 +00:00
d372f0a23c fix(deps): update module golang.org/x/oauth2 to v0.7.0 2023-04-07 09:01:39 +00:00
d7ef00fb85 fix(deps): update module golang.org/x/image to v0.7.0 2023-04-06 17:01:49 +00:00
aae8c677c9 fix(deps): update module github.com/spf13/cobra to v1.7.0 2023-04-06 12:25:04 +00:00
cfed1f073d fix(deps): update module golang.org/x/term to v0.7.0 2023-04-06 12:19:14 +00:00
6a836658d7 fix(deps): update github.com/gocarina/gocsv digest to 6445c2b 2023-04-06 12:01:38 +00:00
b1da03f7d9 fix(deps): update module golang.org/x/sys to v0.7.0 2023-04-06 11:01:57 +00:00
55956f2b52 fix(deps): update src.techknowlogick.com/xgo digest to bff48e4 (#1474)
Reviewed-on: vikunja/api#1474
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-04-06 10:17:25 +00:00
47e42238ef
fix: make sure Vikunja is buildable without swagger docs present 2023-04-06 12:11:31 +02:00
1c83b7b3c0 chore(deps): update goreleaser/nfpm docker tag to v2.28.0 (#1475)
Reviewed-on: vikunja/api#1475
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-04-06 09:55:58 +00:00
Dominik Pschenitschni
cca430810d fix(image): json type of struct property (#1469)
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1469
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
2023-04-06 09:53:09 +00:00
f76bb2b4a9 fix: align task ID param 2023-04-05 12:14:10 +00:00
7ada82ea92 fix: align namespaceID param 2023-04-05 12:14:10 +00:00
cd90db3117 chore: fix spelling 2023-04-05 12:14:10 +00:00
b6d5605ef6 fix: align "ID" param for Delete and Update method of Task model 2023-04-05 12:14:10 +00:00
ac377a7a5d fix: align "otherTaskID" param for Delete method of TaskRelation model 2023-04-05 12:14:10 +00:00
22f89c1ccc
docs: add information about our Helm Chart 2023-04-05 13:54:18 +02:00
Dominik Pschenitschni
848f596636 feat(docs): change order of sections in nav (#1471)
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: vikunja/api#1471
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
2023-04-05 11:36:21 +00:00
c45ad112a2
fix(migration): don't try to fetch task details of tasks whose projects are deleted 2023-04-04 11:24:59 +02:00
84933c08cc
feat(users): don't hide user email if it was the search request 2023-04-03 19:41:20 +02:00
dff4e01327
fix: ILIKE helper 2023-04-03 19:19:51 +02:00
a7231e197e
feat: allow to find users with access to a project more freely
Related to vikunja/frontend#2196
2023-04-03 18:49:04 +02:00
327bb3bed9
docs: remove outdated information 2023-04-03 12:07:50 +02:00
b826c13f38 feat: improve relation kinds docs 2023-04-03 05:43:27 +00:00
eb93ccb827 chore(docs): add info about /buckets sorting 2023-04-03 05:20:42 +00:00
8edbca39cf fix: accept for migrations 2023-04-03 05:20:18 +00:00
441722372a feat: add token example 2023-04-03 05:20:01 +00:00
4f7d69a108 fix: docs auth openID method 2023-04-03 05:19:32 +00:00
fc2cc4a155 fix: spelling 2023-04-03 05:19:08 +00:00
a734b86bcd
fix(docs): link to usage/api 2023-04-03 02:26:45 +02:00
Dominik Pschenitschni
cf7423fc1a fix(api): license (#1457)
Reviewed-on: vikunja/api#1457
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
2023-04-02 19:34:06 +00:00
Skyler Hawthorne
ae5a3cf020 update prometheus docs for clarity (#1458)
Make it clearer that the `/metrics` endpoint is under `/api/v1`

Co-authored-by: Skyler Hawthorne <skyler@dead10ck.com>
Reviewed-on: vikunja/api#1458
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Skyler Hawthorne <dead10ck@noreply.kolaente.de>
Co-committed-by: Skyler Hawthorne <dead10ck@noreply.kolaente.de>
2023-04-02 18:10:55 +00:00
01fb738dc8
fix(build): make sure the docker image can access go tools 2023-04-02 18:55:30 +02:00
791a57d320
fix(ci): pipeline dependency 2023-04-02 16:58:58 +02:00
efa24cec44
feat: generate swagger docs at build time 2023-04-02 16:52:54 +02:00
7153de5c2a fix(deps): update module github.com/redis/go-redis/v9 to v9.0.3 2023-04-02 13:01:49 +00:00
cernst
1cffef6908 fix(caldav): Incoming tasks do not get correct time zone (#1455)
Dates from tasks.org may be formatted like DUE;TZID=Europe/Berlin:20230402T150000
After this fix the parameter TZID is no longer ignored and the Vikunja task gets a DueDate of 13:00 UTC, which corresponds to 15:00 in Europe/Berlin. Before this fix, the time was parsed to 15:00 UTC.

Resolves vikunja/api#1453

Co-authored-by: ce72 <christoph.ernst72@googlemail.com>
Reviewed-on: vikunja/api#1455
Reviewed-by: konrad <k@knt.li>
Co-authored-by: cernst <ce72@noreply.kolaente.de>
Co-committed-by: cernst <ce72@noreply.kolaente.de>
2023-04-02 12:31:31 +00:00
cernst
f45648a6f7 feat(caldav): Sync Reminders / VALARM (#1415)
Co-authored-by: ce72 <christoph.ernst72@googlemail.com>
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1415
Reviewed-by: konrad <k@knt.li>
Co-authored-by: cernst <ce72@noreply.kolaente.de>
Co-committed-by: cernst <ce72@noreply.kolaente.de>
2023-04-01 11:09:11 +00:00
9443fb1bd5 fix(deps): update module github.com/getsentry/sentry-go to v0.20.0 2023-03-31 10:01:47 +00:00
5114f53307 fix(deps): update module github.com/swaggo/swag to v1.8.12 2023-03-28 12:01:46 +00:00
cernst
3f5252dc24 feat: Add relative Reminders (#1427)
Partially resolves #1416

Co-authored-by: ce72 <christoph.ernst72@googlemail.com>
Reviewed-on: vikunja/api#1427
Reviewed-by: konrad <k@knt.li>
Co-authored-by: cernst <ce72@noreply.kolaente.de>
Co-committed-by: cernst <ce72@noreply.kolaente.de>
2023-03-27 20:07:06 +00:00
823c817b1f
fix(import): don't try to load a nonexistant attachment file 2023-03-26 15:42:25 +02:00
84c3d0ef6d fix(deps): update github.com/gocarina/gocsv digest to 9a18a84 2023-03-25 18:02:07 +00:00
f4e12dab27 fix: add missing license header 2023-03-25 12:28:56 +00:00
f0dcce702f fix: lint 2023-03-25 12:28:56 +00:00
9590b82c11 feat: add logging options to mailer settings 2023-03-25 12:28:56 +00:00
7987efcefc fix(deps): update module github.com/wneessen/go-mail to v0.3.9 2023-03-25 12:28:56 +00:00
cernst
5961e56d16 fix(caldav): Do not create label if it exists by title (#1444)
Resolves vikunja/api#1435

Co-authored-by: ce72 <christoph.ernst72@googlemail.com>
Reviewed-on: vikunja/api#1444
Co-authored-by: cernst <ce72@noreply.kolaente.de>
Co-committed-by: cernst <ce72@noreply.kolaente.de>
2023-03-24 18:34:48 +00:00
33f0d0f85a
fix: update xgo in dockerfile to 1.20.2
Resolves vikunja/api#1445
2023-03-24 19:24:25 +01:00
4d5ad8f50e
chore(deps): update golangci-lint to 1.52.1 2023-03-24 19:17:45 +01:00
f6e6c5c8fc fix(deps): update module github.com/imdario/mergo to v0.3.15 (#1443)
Reviewed-on: vikunja/api#1443
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-03-24 10:16:51 +00:00
6aadaaaffc chore: rename files (fix typo) 2023-03-21 19:02:05 +00:00
6566f0e81d fix(deps): update module github.com/swaggo/swag to v1.8.11 2023-03-21 13:01:35 +00:00
6d8db0ce1e chore(deps): update goreleaser/nfpm docker tag to v2.27.1 (#1438)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1438
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-03-20 20:21:40 +00:00
085b9222bb fix(deps): update github.com/arran4/golang-ical digest to 19abf92 2023-03-18 09:01:35 +00:00
a0b3a444df
fix(lint): disable misspell linter on redoc 2023-03-18 09:55:18 +01:00
8916de0366
fix: update redoc 2023-03-16 19:08:18 +01:00
769db0dab2 fix(deps): update module github.com/imdario/mergo to v0.3.14 2023-03-16 00:01:43 +00:00
259cf7d25b
docs: update error references to list 2023-03-14 17:41:26 +01:00
8dc6c95333
docs: update references to list 2023-03-14 17:39:46 +01:00
869d4a336c feat: rename lists to projects everywhere (#1318)
Reviewed-on: vikunja/api#1318
2023-03-14 13:19:47 +00:00
7a9611c2da
chore: cleanup 2023-03-13 14:28:36 +01:00
7cab3a77a9
fix(migration): rename TickTick migration 2023-03-13 14:28:25 +01:00
77ad90d53e
fix(migration): remove wunderlist leftovers 2023-03-13 14:28:20 +01:00
55410ea73d
chore: generate swagger docs 2023-03-13 14:28:19 +01:00
e4f841cf6a
fix(tasks): sql for overdue reminders 2023-03-13 14:28:19 +01:00
2940eae1aa
fix(migration): use correct struct 2023-03-13 14:28:19 +01:00
0a3fdc0344
fix: users_lists name in migration 2023-03-13 14:28:19 +01:00
06f1d2e912
fix: test fixtures 2023-03-13 14:28:07 +01:00
61a3380a94
fix: trello import tests 2023-03-13 14:28:07 +01:00
fb818ea186
fix: test import 2023-03-13 14:28:06 +01:00
7e53a21407
fix: rename incorrectly named ProjectUsers method 2023-03-13 14:28:06 +01:00
8f4abd2fe8
feat: rename all list files 2023-03-13 14:28:06 +01:00
2fba7bdf02
feat: migrate lists to projects in db identifiers 2023-03-13 14:28:06 +01:00
349e6a5905
feat: rename lists to projects 2023-03-13 14:28:06 +01:00
80266d1383
fix(docker): don't chown everything in Vikunja's default root folder
This would try to chown a mounted Vikunja config file as well which failed when that config file was mounted read-only.
2023-03-13 11:23:51 +01:00
c0c523f0a8
fix: don't send bad request errors to sentry 2023-03-13 10:52:52 +01:00
672fb35bcb
fix: check if usernames contain spaces when creating a new user 2023-03-12 15:02:34 +01:00
1f13b5d7b4
docs: fix menu links 2023-03-12 10:46:17 +01:00
e79778e213
chore: 0.20.4 release preperations 2023-03-12 10:24:34 +01:00
a897ffc8ee
fix(docker): allow non-unique group id 2023-03-11 15:04:36 +01:00
4de0efec1d
docs: add link to tutorial for installing Vikunja on Synology 2023-03-11 14:55:30 +01:00
09ddd5a31a
chore: 0.20.3 release preperations 2023-03-10 14:55:01 +01:00
387aa2db93 fix(deps): update module github.com/gabriel-vasile/mimetype to v1.4.2 2023-03-08 15:01:24 +00:00
4f62e978ef fix(deps): update src.techknowlogick.com/xgo digest to b607086 2023-03-07 18:01:48 +00:00
a5c241758a fix(deps): update module github.com/ulule/limiter/v3 to v3.11.1 2023-03-07 10:01:21 +00:00
abf38defa2 fix(deps): update module github.com/spf13/afero to v1.9.5 2023-03-06 10:01:21 +00:00
29f8522de9 fix(deps): update module github.com/getsentry/sentry-go to v0.19.0 2023-03-06 08:01:20 +00:00
9f14466dfa
fix: lint 2023-03-05 22:24:29 +01:00
4a82f3be3c fix(deps): update src.techknowlogick.com/xgo digest to 44f7e66 2023-03-05 20:31:58 +00:00
a39b3aeb06 fix(deps): update github.com/vectordotdev/go-datemath digest to f3954d0 2023-03-05 19:01:25 +00:00
b4c215f4dd
chore(deps): remove fsnotify replacement 2023-03-05 19:13:19 +01:00
f0a8516926 chore(deps): update github.com/kolaente/caldav-go digest to 2a4eb8b 2023-03-05 18:01:29 +00:00
077baba2ea
fix: lint 2023-03-05 14:34:34 +01:00
066c26f83e
fix(caldav): make sure only labels where the user has permission to use them are used
Follow-up for a62b57ac62
2023-03-05 14:03:09 +01:00
eda5135b3c fix(deps): update module golang.org/x/image to v0.6.0 2023-03-05 09:01:16 +00:00
906c9fc06b fix(deps): update module golang.org/x/oauth2 to v0.6.0 2023-03-05 08:01:23 +00:00
e37dbb1648 fix(deps): update module golang.org/x/crypto to v0.7.0 2023-03-05 07:28:11 +00:00
cd13f86e0d fix(deps): update module golang.org/x/term to v0.6.0 2023-03-05 02:01:25 +00:00
7ad754dd3b fix(deps): update module golang.org/x/sys to v0.6.0 2023-03-04 16:01:23 +00:00
cernst
a62b57ac62 feat(caldav): import caldav categories as Labels (#1413)
Resolves #1274

Co-authored-by: ce72 <christoph.ernst72@googlemail.com>
Reviewed-on: vikunja/api#1413
Reviewed-by: konrad <k@knt.li>
Co-authored-by: cernst <ce72@noreply.kolaente.de>
Co-committed-by: cernst <ce72@noreply.kolaente.de>
2023-03-02 15:25:26 +00:00
534d04a1db
fix(task): correctly load tasks by id and uuid in caldav
Partially reverts 1afc72e190
2023-03-01 22:18:59 +01:00
e8c85562b1
fix(docs): clarify support for caldav reccurrence 2023-03-01 11:05:35 +01:00
cernst
1afc72e190 fix: Make sure labels are always exported as caldav (#1412)
Authored-by: ce72 <christoph.ernst72@googlemail.com>
Reviewed-on: vikunja/api#1412
Reviewed-by: konrad <k@knt.li>
Co-authored-by: cernst <ce72@noreply.kolaente.de>
Co-committed-by: cernst <ce72@noreply.kolaente.de>
2023-02-28 10:42:57 +00:00
cernst
53197b85e3 feat(caldav): Export Labels to Caldav (#1409)
Partially resolves vikunja/api#1274

Co-authored-by: ce72 <christoph.ernst72@googlemail.com>
Reviewed-on: vikunja/api#1409
Reviewed-by: konrad <k@knt.li>
Co-authored-by: cernst <ce72@noreply.kolaente.de>
Co-committed-by: cernst <ce72@noreply.kolaente.de>
2023-02-27 11:22:42 +00:00
d47535b831 fix(deps): update github.com/gocarina/gocsv digest to 70c27cb 2023-02-26 14:01:15 +00:00
c9ce9c2382 fix(deps): update module github.com/stretchr/testify to v1.8.2 2023-02-25 13:01:15 +00:00
168287923f
fix(migration): make sure trello checklists are properly imported 2023-02-24 12:13:18 +01:00
ca6d1946da
fix(tasks): make sure tasks are sorted by position before recalculating them 2023-02-23 17:43:23 +01:00
8b745ad599 fix(deps): update github.com/gocarina/gocsv digest to dc4ee9d 2023-02-23 15:06:32 +00:00
1efa1696bf
fix(tasks): recalculate position of all tasks in a list or bucket when it would hit 0 2023-02-23 16:00:41 +01:00
6908167fb2 fix(deps): update module github.com/spf13/afero to v1.9.4 2023-02-23 10:01:17 +00:00
26b280019b fix(deps): update module github.com/labstack/echo/v4 to v4.10.2 2023-02-22 00:01:46 +00:00
d19529e84f fix(deps): update github.com/gocarina/gocsv digest to bee85ea 2023-02-21 18:01:17 +00:00
0f7f595cc3 fix(deps): update module github.com/labstack/echo/v4 to v4.10.1 2023-02-20 21:17:39 +00:00
c6769d407e
chore(deps): update golangci-lint to 1.51.2 2023-02-20 15:17:49 +01:00
8df94e8800 fix(deps): update github.com/gocarina/gocsv digest to bcce7dc 2023-02-19 21:01:13 +00:00
5af1147e0d fix(deps): update module github.com/golang-jwt/jwt/v4 to v4.5.0 (#1399)
Reviewed-on: vikunja/api#1399
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-02-19 12:38:39 +00:00
8bf224d392
chore(deps): update golang.org/x/net to 0.7.0 2023-02-18 17:32:14 +01:00
0a0374e268
chore(docs): remove sponsors 2023-02-15 11:11:10 +01:00
da9d25cf72
feat: disable events log by default
BREAKING CHANGE: events log level is now off unless explicitly enabled
2023-02-15 10:44:02 +01:00
eb33655c1c
fix(docker): make sure the vikunja user always exists and only modify the uid instead of recreating the user
Resolves #1392
2023-02-15 10:39:48 +01:00
20a5994b17
fix: lint 2023-02-14 20:37:16 +01:00
5a0cee2fc5 fix(deps): update module golang.org/x/image to v0.5.0 (#1396)
Reviewed-on: vikunja/api#1396
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-02-14 19:21:12 +00:00
fceb5dae0f
fix(task): make sure the task's last updated timestamp is always updated when releated entities changed 2023-02-14 20:09:05 +01:00
659803fadf fix(deps): update module github.com/threedotslabs/watermill to v1.2.0 (#1384)
Reviewed-on: vikunja/api#1384
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-02-14 09:51:50 +00:00
4fbe2b313b fix(deps): update github.com/arran4/golang-ical digest to 07c6aad 2023-02-14 00:02:42 +00:00
a6a47a27cb chore(deps): update goreleaser/nfpm docker tag to v2.26.0 (#1394)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1394
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-02-13 10:05:08 +00:00
247f678491 fix(deps): update module golang.org/x/image to v0.4.0 2023-02-09 08:01:12 +00:00
7d796cea0a fix(deps): update module golang.org/x/oauth2 to v0.5.0 2023-02-09 07:32:59 +00:00
984bcb90e1 fix(deps): update module golang.org/x/crypto to v0.6.0 2023-02-08 23:01:19 +00:00
6bbcd1399f fix(deps): update module golang.org/x/term to v0.5.0 2023-02-07 20:01:16 +00:00
58da38adb6
fix(migration): don't try to add nonexistent tasks as related
Discussion: https://community.vikunja.io/t/todoist-migration-fails-after-51-iterations-19-minutes/1137
2023-02-07 17:06:04 +01:00
4a05d1a497 fix(deps): update module github.com/getsentry/sentry-go to v0.18.0 (#1386)
Reviewed-on: vikunja/api#1386
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-02-07 15:12:41 +00:00
d6643f5af3 fix(deps): update module golang.org/x/sys to v0.5.0 2023-02-07 01:01:18 +00:00
aa25ccdc91
chore: update funding links 2023-02-03 11:48:44 +01:00
cb96590611 fix(docd): Update Subdirectory Documentation (#1363)
Signed-off-by: Jef Oliver <jef@eljef.me>
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1363
Co-authored-by: Jef Oliver <jef@eljef.me>
Co-committed-by: Jef Oliver <jef@eljef.me>
2023-02-03 08:41:36 +00:00
5d242f7e54
chore(deps): update xgo to 1.20 2023-02-02 17:44:57 +01:00
02352841dc chore(deps): update module go to 1.20 2023-02-02 16:37:47 +00:00
d682a22cd5 fix(deps): update module github.com/yuin/goldmark to v1.5.4 2023-02-02 13:01:12 +00:00
fdbe110945
chore(deps): upgrade golangci-lint to 1.51.0 2023-02-02 11:16:07 +01:00
7b46446e03 chore(deps): update goreleaser/nfpm docker tag to v2.25.0 (#1382)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1382
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-02-02 10:12:02 +00:00
3b1887e438
fix(docker): passing environment variables into the container 2023-02-01 18:50:40 +01:00
32ff4b2cbd
fix(docker): re-add expose 2023-02-01 18:39:57 +01:00
6ddadba573
fix(docker): cross compilation with buildx 2023-02-01 15:06:55 +01:00
clos
afdceb0aff fix(list): when list background is removed, delete file from file system and DB (#1372)
Co-authored-by: testinho.testador <testinho.testador@noreply.kolaente.de>
Reviewed-on: vikunja/api#1372
Reviewed-by: konrad <k@knt.li>
Co-authored-by: clos <clos@noreply.kolaente.de>
Co-committed-by: clos <clos@noreply.kolaente.de>
2023-02-01 11:38:23 +00:00
437960b146 fix(deps): update module github.com/redis/go-redis/v9 to v9.0.2 2023-02-01 09:01:10 +00:00
75baba32a6 fix(deps): update module github.com/ulule/limiter/v3 to v3.11.0 (#1378)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1378
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-31 20:38:02 +00:00
9432b437fe fix(deps): update module github.com/labstack/echo-jwt/v4 to v4.1.0 2023-01-31 17:01:19 +00:00
ef8e97f95e fix(deps): update module github.com/go-redis/redis/v8 to v9 (#1377)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1377
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-31 16:45:58 +00:00
522bf7d2fc feat: refactored Dockerfile (#1375)
- Removed VIKUNJA_VERSION and custom git checkout, because it is not found in the repository. So it is not used anywhere.
- Optimized runner commands order
- Removed run.sh (it is not needed in fact)

Co-authored-by: Yurii Vlasov <yv@itsvit.org>
Reviewed-on: vikunja/api#1375
Co-authored-by: Yurii Vlasov <yuriy@vlasov.pro>
Co-committed-by: Yurii Vlasov <yuriy@vlasov.pro>
2023-01-31 16:16:21 +00:00
rriski
88dd544fc9
fix(docs): fix traefik v2 example (#65) 2023-01-31 15:43:29 +01:00
clos
f660badc3d feat(background): add Last-Modified header (#1376)
Reviewed-on: vikunja/api#1376
Co-authored-by: clos <clos@noreply.kolaente.de>
Co-committed-by: clos <clos@noreply.kolaente.de>
2023-01-29 22:07:46 +00:00
491a142378
fix: lint 2023-01-29 22:42:24 +01:00
46b261c9fe
chore(docs): adjust docs about frontend docker container 2023-01-29 15:53:10 +01:00
40411e4100
chore(task): add test to check if a task's reminders are duplicated 2023-01-26 16:06:49 +01:00
f2b4e9260b fix(deps): update module github.com/swaggo/swag to v1.8.10 (#1371)
Reviewed-on: vikunja/api#1371
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-25 21:11:25 +00:00
682123a9c9
fix(migration): todoist pagination now avoids too many loops 2023-01-24 22:27:57 +01:00
0cd9cd324e chore(deps): update goreleaser/nfpm docker tag to v2.24.0 (#1367)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1367
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-24 18:21:45 +00:00
100897cc9d fix(deps): update github.com/gocarina/gocsv digest to 763e25b (#1370)
Reviewed-on: vikunja/api#1370
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-24 17:49:13 +00:00
c59e006453
fix(migration): remove unused todoist parameters 2023-01-24 18:44:33 +01:00
6a87d919fa
fix(ci): sign drone config
(cherry picked from commit 6259dd8d42)
2023-01-24 17:48:00 +01:00
d52816c7d7
fix(ci): save generated .tags file to correctly tag docker releases 2023-01-24 17:47:05 +01:00
87d0134bb2 fix(deps): update module golang.org/x/oauth2 to v0.4.0 (#1354)
Reviewed-on: vikunja/api#1354
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-24 16:23:04 +00:00
d19fc80b8b
chore: 0.20.2 release preperations 2023-01-24 17:15:00 +01:00
fecce19f06 fix(deps): update module github.com/labstack/echo-jwt/v4 to v4.0.1 (#1369)
Reviewed-on: vikunja/api#1369
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-24 15:34:54 +00:00
1971df7b84
fix(migration): use the proper authorization method for Todoist's api, fix issues with importing deleted items 2023-01-24 15:45:56 +01:00
31a1452839 fix(migration): import TickTick data by column name instead of index (#1356)
Resolves: https://github.com/go-vikunja/api/issues/61
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1356
Co-authored-by: kooshi <kolaente.dev@pat.de.com>
Co-committed-by: kooshi <kolaente.dev@pat.de.com>
2023-01-24 13:58:18 +00:00
530bb0a63c
fix(user): make reset the user's name to empty actually work 2023-01-23 18:30:01 +01:00
7bf7a13bb9
fix(reminders): prevent duplicate reminders when updating task details 2023-01-23 18:14:15 +01:00
10e6843b11 fix(deps): update module github.com/spf13/viper to v1.15.0 (#1365)
Reviewed-on: vikunja/api#1365
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-19 16:34:04 +00:00
78f43829cf fix(deps): update module src.techknowlogick.com/xgo to v1.7.0+1.19.5 (#1364)
Reviewed-on: vikunja/api#1364
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-17 21:05:33 +00:00
acd31c4ff7 fix(deps): update module github.com/getsentry/sentry-go to v0.17.0 (#1361)
Reviewed-on: vikunja/api#1361
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-12 13:25:10 +00:00
1c02114cf5 chore(deps): update klakegg/hugo docker tag to v0.107.0 (#1272)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1272
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-11 19:48:22 +00:00
82f4a5ad50
fix(export): ignore file size for export files 2023-01-11 18:56:30 +01:00
04614614fe
fix(tasks): don't set a repeating task done when moving it do the done bucket 2023-01-11 18:46:24 +01:00
608bde9806
fix(ci): tagging logic for release docker images 2023-01-11 18:13:11 +01:00
568cc16797 fix(deps): update module src.techknowlogick.com/xgo to v1.6.0+1.19.5 (#1358)
Reviewed-on: vikunja/api#1358
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-10 19:21:26 +00:00
Rein
4b5e65d4c2
fix(mailer): forcessl config (#60)
Co-authored-by: Rein-R3 <rein@reinsan.top>
Reviewed-At: https://github.com/go-vikunja/api/pull/60
2023-01-09 12:39:43 +01:00
3329d83363 fix(deps): update module github.com/wneessen/go-mail to v0.3.8 (#1357)
Reviewed-on: vikunja/api#1357
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-07 12:52:06 +00:00
c4e5e722e4 chore(deps): update goreleaser/nfpm docker tag to v2.23.0 (#1347)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1347
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-06 11:05:47 +00:00
Dominik Pschenitschni
508a3157e2 fix(drone): add type, fix pull, remove group (#1355)
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1355
Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
2023-01-06 09:46:52 +00:00
TheDubliner
321a8f7e2b
fix(docs): fix a few minor typos (#59) 2023-01-06 10:33:43 +01:00
dd7dcdd0cc fix(deps): update module golang.org/x/crypto to v0.5.0 (#1353)
Reviewed-on: vikunja/api#1353
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-04 18:37:35 +00:00
cb6368036c fix(deps): update module golang.org/x/term to v0.4.0 (#1352)
Reviewed-on: vikunja/api#1352
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-04 18:23:30 +00:00
36dfcb8ddb fix(deps): update module golang.org/x/image to v0.3.0 (#1350)
Reviewed-on: vikunja/api#1350
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-04 16:16:04 +00:00
7f8c85118e fix(deps): update module golang.org/x/sys to v0.4.0 (#1351)
Reviewed-on: vikunja/api#1351
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-04 16:15:58 +00:00
f3476bec6c fix(deps): update module github.com/coreos/go-oidc/v3 to v3.5.0 (#1349)
Reviewed-on: vikunja/api#1349
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-04 11:03:19 +00:00
392bdd1b94
fix(ci): set release path to /source
Should fix https://github.com/techknowlogick/xgo/issues/187
2023-01-03 16:02:17 +01:00
80634d43c1 fix(deps): update module github.com/wneessen/go-mail to v0.3.7 (#1348)
Reviewed-on: vikunja/api#1348
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2023-01-03 14:48:48 +00:00
4fa45bf9dc
chore: remove custom gitea bug template in favor of githubs 2022-12-30 11:57:03 +01:00
ef1d1e2b20 feat(migrators): remove wunderlist (#1346)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1346
2022-12-29 17:12:39 +00:00
Dominik Pschenitschni
ca3580766e fix(docs): old helm charts url (#1344)
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: vikunja/api#1344
Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
2022-12-28 16:06:55 +00:00
c6429c8b13 fix(deps): update module github.com/labstack/echo/v4 to v4.10.0 (#1343)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1343
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-28 10:32:12 +00:00
304481cf28 fix(deps): update module github.com/wneessen/go-mail to v0.3.6 (#1342)
Reviewed-on: vikunja/api#1342
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-26 17:29:28 +00:00
897a6e5d5c
fix(caldav): use const for repeat modes 2022-12-24 14:34:59 +01:00
194b88e2eb
fix(tasks): don't reset the kanban bucket when updating a task and not providing one
Resolves https://github.com/go-vikunja/api/issues/56
2022-12-24 14:30:34 +01:00
c5327845ee
feat(caldav): add support for repeating tasks
Resolves https://github.com/go-vikunja/api/issues/57#issuecomment-1364373103
2022-12-24 12:19:51 +01:00
ea1d06bda6
fix(list): return lists for a namespace id even if that namespace is deleted
This fixes a problem where a namespace was deleted and its list were not.
Forum discussion: https://community.vikunja.io/t/list-deleted-but-tasks-showing-up-as-archived-and-overdue/1025
2022-12-23 17:48:21 +01:00
0104aa504b
fix(ci): pin nfpm container version and binary location 2022-12-19 15:37:01 +01:00
6a97a214a3
fix(migration): use Todoist v9 api to migrate tasks from them
Discussion: https://community.vikunja.io/t/importing-tasks-from-todoist/322/7
2022-12-18 20:38:58 +01:00
a79b1de2d0 feat: provide logout url for openid providers (#1340)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1340
Co-authored-by: viehlieb <pf@pragma-shift.net>
Co-committed-by: viehlieb <pf@pragma-shift.net>
2022-12-18 18:26:28 +00:00
e9ce930230 fix(deps): update module github.com/swaggo/swag to v1.8.9 (#1327)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1327
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-18 16:43:30 +00:00
6cb48e430e fix(deps): update module github.com/pquerna/otp to v1.4.0 (#1341)
Reviewed-on: vikunja/api#1341
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-14 07:21:11 +00:00
a2c8426d02 fix(deps): update module golang.org/x/crypto to v0.4.0 (#1339)
Reviewed-on: vikunja/api#1339
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-07 13:16:10 +00:00
3be10ca4a2 fix(deps): update module github.com/getsentry/sentry-go to v0.16.0 (#1338)
Reviewed-on: vikunja/api#1338
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-07 12:15:16 +00:00
ec297009d3 fix(deps): update module golang.org/x/oauth2 to v0.3.0 (#1337)
Reviewed-on: vikunja/api#1337
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-06 16:25:24 +00:00
dbc30284f3 fix(deps): update module golang.org/x/oauth2 to v0.2.0 (#1316)
Reviewed-on: vikunja/api#1316
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-06 08:14:40 +00:00
879324dcd0 fix(deps): update module golang.org/x/image to v0.2.0 (#1335)
Reviewed-on: vikunja/api#1335
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-06 07:58:51 +00:00
3be6e93a05 fix(deps): update module golang.org/x/term to v0.3.0 (#1336)
Reviewed-on: vikunja/api#1336
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-06 07:58:21 +00:00
f93317bf5d
fix(caldav): add Z suffix to dates make it clear dates are in UTC 2022-12-04 21:01:04 +01:00
1cfdb085e5 fix(deps): update module golang.org/x/sys to v0.3.0 (#1333)
Reviewed-on: vikunja/api#1333
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-04 16:56:44 +00:00
51cf8beaed
feat(release): use compressed binaries for package releases
vikunja/api#1330
2022-12-02 16:31:06 +01:00
b8c3b570a4
fix(restore): check if we're really dealing with a string 2022-12-02 14:49:32 +01:00
8ae062a095 fix(deps): update module github.com/go-sql-driver/mysql to v1.7.0 (#1332)
Reviewed-on: vikunja/api#1332
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-02 13:39:25 +00:00
941d1e06c5
fix(build): downgrade xgo to 1.19.2 so that builds work again
See https://github.com/techknowlogick/xgo/issues/187
2022-12-01 19:00:48 +01:00
1f2eb57602
fix(reminders): make sure an overdue reminder is sent when there is only one overdue task 2022-12-01 18:41:24 +01:00
51911a8868
fix(reminders): overdue tasks join condition 2022-12-01 18:30:05 +01:00
47aae115df
fix(tasks): don't include undone overdue tasks from archived lists or namespaces in notification mails
Resolves vikunja/api#1324
2022-12-01 18:07:30 +01:00
fbc4b91e0f
fix(dump): make sure null dates are properly set when restoring from a dump 2022-12-01 17:53:02 +01:00
8c67be558f
fix: restore notifications table from dump when it already had the correct format 2022-12-01 17:33:00 +01:00
e27cd9b336 fix(deps): update module github.com/golang-jwt/jwt/v4 to v4.4.3 (#1328)
Reviewed-on: vikunja/api#1328
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-29 15:14:04 +00:00
23b01a1ff6 fix(deps): update github.com/arran4/golang-ical digest to 1093469 (#1326)
Reviewed-on: vikunja/api#1326
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-22 13:19:30 +00:00
f47faf577a fix(deps): update module github.com/wneessen/go-mail to v0.3.5 (#1325)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1325
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-21 11:56:19 +00:00
312525ebef fix(deps): update github.com/arran4/golang-ical digest to a677353 (#1323)
Reviewed-on: vikunja/api#1323
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-21 10:49:41 +00:00
a17d2f4288 fix(deps): update module golang.org/x/crypto to v0.3.0 (#1321)
Reviewed-on: vikunja/api#1321
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-16 22:16:31 +00:00
7e0aa20658
fix(docs): add docs about cli user delete 2022-11-15 14:53:58 +01:00
c5a55e39bf fix(deps): update module github.com/spf13/afero to v1.9.3 (#1320)
Reviewed-on: vikunja/api#1320
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-14 20:55:13 +00:00
4d4ffe8b34 Added Google & Google Workspace to OpenId examples (#1319)
Reviewed-on: vikunja/api#1319
Co-authored-by: the-darkvoid <darkvoid@gmail.com>
Co-committed-by: the-darkvoid <darkvoid@gmail.com>
2022-11-14 11:41:45 +00:00
3d9fcb9ffb
fix(ci): pipeline dependency 2022-11-12 14:32:16 +01:00
a6e214b654
feat: use docker buildx to build multiarch images 2022-11-12 14:30:48 +01:00
c47e07f9b0 fix(deps): update module golang.org/x/crypto to v0.2.0 (#1315)
Reviewed-on: vikunja/api#1315
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-12 13:14:07 +00:00
3a4a04ee8e fix(deps): update module github.com/yuin/goldmark to v1.5.3 (#1317)
Reviewed-on: vikunja/api#1317
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-12 12:15:44 +00:00
96b5e93379
fix: swagger docs 2022-11-11 15:34:26 +01:00
455 changed files with 14912 additions and 38042 deletions

View File

@ -1,4 +1,7 @@
files/
dist/
logs/
Dockerfile
docker-manifest.tmpl
docker-manifest-unstable.tmpl

View File

@ -1,5 +1,6 @@
---
kind: pipeline
type: docker
name: testing
workspace:
@ -111,7 +112,7 @@ steps:
# compiling the same magefile at the same time. It's also faster if each step does not need to compile it first.
- name: mage
image: vikunja/golang-build:latest
pull: true
pull: always
environment:
GOPROXY: 'https://goproxy.kolaente.de'
commands:
@ -120,12 +121,23 @@ steps:
when:
event: [ push, tag, pull_request ]
- name: build
- name: prepare-build
image: vikunja/golang-build:latest
pull: true
pull: always
environment:
GOPROXY: 'https://goproxy.kolaente.de'
depends_on: [ mage ]
commands:
- ./mage-static do-the-swag
when:
event: [ push, tag, pull_request ]
- name: build
image: vikunja/golang-build:latest
pull: always
environment:
GOPROXY: 'https://goproxy.kolaente.de'
depends_on: [ prepare-build ]
commands:
- ./mage-static build:build
when:
@ -133,21 +145,21 @@ steps:
- name: lint
image: golang:1.19-alpine
pull: true
pull: always
environment:
GOPROXY: 'https://goproxy.kolaente.de'
depends_on: [ build ]
commands:
- export "GOROOT=$(go env GOROOT)"
- 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.49.0
- ./mage-static check:all
- wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.2
- ./mage-static check:golangci
when:
event: [ push, tag, pull_request ]
- name: test-migration-prepare
image: kolaente/toolbox:latest
pull: true
pull: always
commands:
# Get the latest version
- wget https://dl.vikunja.io/api/unstable/vikunja-unstable-linux-amd64-full.zip -q -O vikunja-latest.zip
@ -155,7 +167,7 @@ steps:
- name: test-migration-sqlite
image: vikunja/golang-build:latest
pull: true
pull: always
depends_on: [ test-migration-prepare, build ]
environment:
VIKUNJA_DATABASE_TYPE: sqlite
@ -174,7 +186,7 @@ steps:
- name: test-migration-mysql
image: vikunja/golang-build:latest
pull: true
pull: always
depends_on: [ test-migration-prepare, build ]
environment:
VIKUNJA_DATABASE_TYPE: mysql
@ -193,7 +205,7 @@ steps:
- name: test-migration-psql
image: vikunja/golang-build:latest
pull: true
pull: always
depends_on: [ test-migration-prepare, build ]
environment:
VIKUNJA_DATABASE_TYPE: postgres
@ -213,18 +225,18 @@ steps:
- name: test
image: vikunja/golang-build:latest
pull: true
pull: always
environment:
GOPROXY: 'https://goproxy.kolaente.de'
commands:
- ./mage-static test:unit
depends_on: [ fetch-tags, mage ]
depends_on: [ fetch-tags, prepare-build ]
when:
event: [ push, tag, pull_request ]
- name: test-sqlite
image: vikunja/golang-build:latest
pull: true
pull: always
environment:
GOPROXY: 'https://goproxy.kolaente.de'
VIKUNJA_TESTS_USE_CONFIG: 1
@ -235,13 +247,13 @@ steps:
path: /db
commands:
- ./mage-static test:unit
depends_on: [ fetch-tags, mage ]
depends_on: [ fetch-tags, prepare-build ]
when:
event: [ push, tag, pull_request ]
- name: test-mysql
image: vikunja/golang-build:latest
pull: true
pull: always
environment:
GOPROXY: 'https://goproxy.kolaente.de'
VIKUNJA_TESTS_USE_CONFIG: 1
@ -252,13 +264,13 @@ steps:
VIKUNJA_DATABASE_DATABASE: vikunjatest
commands:
- ./mage-static test:unit
depends_on: [ fetch-tags, mage ]
depends_on: [ fetch-tags, prepare-build ]
when:
event: [ push, tag, pull_request ]
- name: test-postgres
image: vikunja/golang-build:latest
pull: true
pull: always
environment:
GOPROXY: 'https://goproxy.kolaente.de'
VIKUNJA_TESTS_USE_CONFIG: 1
@ -270,24 +282,24 @@ steps:
VIKUNJA_DATABASE_SSLMODE: disable
commands:
- ./mage-static test:unit
depends_on: [ fetch-tags, mage ]
depends_on: [ fetch-tags, prepare-build ]
when:
event: [ push, tag, pull_request ]
- name: integration-test
image: vikunja/golang-build:latest
pull: true
pull: always
environment:
GOPROXY: 'https://goproxy.kolaente.de'
commands:
- ./mage-static test:integration
depends_on: [ fetch-tags, mage ]
depends_on: [ fetch-tags, prepare-build ]
when:
event: [ push, tag, pull_request ]
- name: integration-test-sqlite
image: vikunja/golang-build:latest
pull: true
pull: always
environment:
GOPROXY: 'https://goproxy.kolaente.de'
VIKUNJA_TESTS_USE_CONFIG: 1
@ -298,13 +310,13 @@ steps:
path: /db
commands:
- ./mage-static test:integration
depends_on: [ fetch-tags, mage ]
depends_on: [ fetch-tags, prepare-build ]
when:
event: [ push, tag, pull_request ]
- name: integration-test-mysql
image: vikunja/golang-build:latest
pull: true
pull: always
environment:
GOPROXY: 'https://goproxy.kolaente.de'
VIKUNJA_TESTS_USE_CONFIG: 1
@ -315,13 +327,13 @@ steps:
VIKUNJA_DATABASE_DATABASE: vikunjatest
commands:
- ./mage-static test:integration
depends_on: [ fetch-tags, mage ]
depends_on: [ fetch-tags, prepare-build ]
when:
event: [ push, tag, pull_request ]
- name: integration-test-postgres
image: vikunja/golang-build:latest
pull: true
pull: always
environment:
GOPROXY: 'https://goproxy.kolaente.de'
VIKUNJA_TESTS_USE_CONFIG: 1
@ -333,7 +345,7 @@ steps:
VIKUNJA_DATABASE_SSLMODE: disable
commands:
- ./mage-static test:integration
depends_on: [ fetch-tags, mage ]
depends_on: [ fetch-tags, prepare-build ]
when:
event: [ push, tag, pull_request ]
@ -343,14 +355,15 @@ steps:
########
kind: pipeline
type: docker
name: release
depends_on:
- testing
workspace:
base: /go
path: src/code.vikunja.io/api
base: /source
path: /
trigger:
ref:
@ -368,7 +381,7 @@ steps:
# compiling the same magefile at the same time. It's also faster if each step does not need to compile it first.
- name: mage
image: vikunja/golang-build:latest
pull: true
pull: always
environment:
GOPROXY: 'https://goproxy.kolaente.de'
commands:
@ -378,16 +391,17 @@ steps:
- name: before-static-build
image: techknowlogick/xgo:latest
pull: true
pull: always
commands:
- export PATH=$PATH:$GOPATH/bin
- go install github.com/magefile/mage
- ./mage-static release:dirs
- ./mage-static do-the-swag
depends_on: [ fetch-tags, mage ]
- name: static-build-windows
image: techknowlogick/xgo:latest
pull: true
pull: always
environment:
# This path does not exist. However, when we set the gopath to /go, the build fails. Not sure why.
# Leaving this here until we know how to resolve this properly.
@ -400,7 +414,7 @@ steps:
- name: static-build-linux
image: techknowlogick/xgo:latest
pull: true
pull: always
environment:
# This path does not exist. However, when we set the gopath to /go, the build fails. Not sure why.
# Leaving this here until we know how to resolve this properly.
@ -413,7 +427,7 @@ steps:
- name: static-build-darwin
image: techknowlogick/xgo:latest
pull: true
pull: always
environment:
# This path does not exist. However, when we set the gopath to /go, the build fails. Not sure why.
# Leaving this here until we know how to resolve this properly.
@ -426,7 +440,7 @@ steps:
- name: after-build-compress
image: kolaente/upx
pull: true
pull: always
depends_on:
- static-build-windows
- static-build-linux
@ -436,7 +450,7 @@ steps:
- name: after-build-static
image: techknowlogick/xgo:latest
pull: true
pull: always
depends_on:
- after-build-compress
commands:
@ -448,7 +462,7 @@ steps:
- name: sign-release
image: plugins/gpgsign:1
pull: true
pull: always
depends_on: [ after-build-static ]
settings:
key:
@ -462,7 +476,7 @@ steps:
# Push the releases to our pseudo-s3-bucket
- name: release-latest
image: plugins/s3
pull: true
pull: always
settings:
bucket: vikunja-releases
access_key:
@ -484,7 +498,7 @@ steps:
- name: release-version
image: plugins/s3
pull: true
pull: always
settings:
bucket: vikunja-releases
access_key:
@ -504,8 +518,8 @@ steps:
# Build os packages and push it to our bucket
- name: build-os-packages-unstable
image: goreleaser/nfpm
pull: true
image: goreleaser/nfpm:v2.30.1
pull: always
commands:
- apk add git go
- ./mage-static release:packages
@ -517,11 +531,11 @@ steps:
- main
event:
- push
depends_on: [ static-build-linux ]
depends_on: [ after-build-compress ]
- name: build-os-packages-version
image: goreleaser/nfpm
pull: true
image: goreleaser/nfpm:v2.30.1
pull: always
commands:
- apk add git go
- ./mage-static release:packages
@ -531,12 +545,12 @@ steps:
when:
event:
- tag
depends_on: [ static-build-linux ]
depends_on: [ after-build-compress ]
# Push the os releases to our pseudo-s3-bucket
- name: release-os-latest
image: plugins/s3
pull: true
pull: always
settings:
bucket: vikunja-releases
access_key:
@ -558,7 +572,7 @@ steps:
- name: release-os-version
image: plugins/s3
pull: true
pull: always
settings:
bucket: vikunja-releases
access_key:
@ -578,6 +592,7 @@ steps:
---
kind: pipeline
type: docker
name: deploy-docs
workspace:
@ -596,8 +611,7 @@ trigger:
steps:
- name: theme
image: kolaente/toolbox
pull: true
group: build-static
pull: always
commands:
- mkdir docs/themes/vikunja -p
- cd docs/themes/vikunja
@ -605,8 +619,8 @@ steps:
- tar -xzf vikunja-theme.tar.gz
- name: build
image: klakegg/hugo:0.104.2
pull: true
image: klakegg/hugo:0.111.3
pull: always
commands:
- cd docs
- hugo
@ -614,7 +628,7 @@ steps:
- name: docker
image: plugins/docker
pull: true
pull: always
settings:
username:
from_secret: docker_username
@ -627,102 +641,11 @@ steps:
---
kind: pipeline
type: docker
name: docker-arm-release
name: docker-release
depends_on:
- testing
platform:
os: linux
arch: arm64
trigger:
ref:
- refs/heads/main
- "refs/tags/**"
steps:
- name: fetch-tags
image: docker:git
commands:
- git fetch --tags
- name: docker-arm-unstable
image: plugins/docker:linux-arm
pull: true
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: vikunja/api
tags: unstable-linux-arm
dockerfile: Dockerfile.arm32
depends_on: [ fetch-tags ]
when:
ref:
- refs/heads/main
- name: docker-arm
image: plugins/docker:linux-arm
pull: true
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: vikunja/api
auto_tag: true
auto_tag_suffix: linux-arm
dockerfile: Dockerfile.arm32
depends_on: [ fetch-tags ]
when:
ref:
- "refs/tags/**"
- name: docker-arm64-unstable
image: plugins/docker:linux-arm64
pull: true
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: vikunja/api
tags: unstable-linux-arm64
depends_on: [ fetch-tags ]
when:
ref:
- refs/heads/main
- name: docker-arm64
image: plugins/docker:linux-arm64
pull: true
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: vikunja/api
auto_tag: true
auto_tag_suffix: linux-arm64
depends_on: [ fetch-tags ]
when:
ref:
- "refs/tags/**"
---
kind: pipeline
type: docker
name: docker-amd64-release
depends_on:
- testing
platform:
os: linux
arch: amd64
trigger:
ref:
- refs/heads/main
@ -735,94 +658,55 @@ steps:
- git fetch --tags
- name: docker-unstable
image: plugins/docker:linux-amd64
pull: true
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: vikunja/api
tags: unstable-linux-amd64
depends_on: [ fetch-tags ]
when:
ref:
- refs/heads/main
- name: docker
image: plugins/docker:linux-amd64
pull: true
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: vikunja/api
auto_tag: true
auto_tag_suffix: linux-amd64
depends_on: [ fetch-tags ]
when:
ref:
- "refs/tags/**"
---
kind: pipeline
type: docker
name: docker-manifest
trigger:
ref:
- refs/heads/main
- "refs/tags/**"
depends_on:
- docker-amd64-release
- docker-arm-release
steps:
- name: manifest-unstable
image: thegeeklab/drone-docker-buildx
privileged: true
pull: always
image: plugins/manifest
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: vikunja/api
tags: unstable
ignore_missing: true
spec: docker-manifest-unstable.tmpl
password:
from_secret: docker_password
username:
from_secret: docker_username
platforms:
- linux/386
- linux/amd64
- linux/arm/v6
- linux/arm/v7
- linux/arm64/v8
depends_on: [ fetch-tags ]
when:
ref:
- refs/heads/main
- name: manifest-release
pull: always
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
spec: docker-manifest.tmpl
password:
from_secret: docker_password
username:
from_secret: docker_username
- name: generate-tags
image: thegeeklab/docker-autotag
environment:
DOCKER_AUTOTAG_VERSION: ${DRONE_TAG}
DOCKER_AUTOTAG_EXTRA_TAGS: latest
DOCKER_AUTOTAG_OUTPUT_FILE: .tags
depends_on: [ fetch-tags ]
when:
ref:
- "refs/tags/**"
- name: manifest-release-latest
- name: docker-release
image: thegeeklab/drone-docker-buildx
privileged: true
pull: always
image: plugins/manifest
depends_on:
- clone
settings:
tags: latest
ignore_missing: true
spec: docker-manifest.tmpl
password:
from_secret: docker_password
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: vikunja/api
platforms:
- linux/386
- linux/amd64
- linux/arm/v6
- linux/arm/v7
- linux/arm64/v8
depends_on: [ generate-tags ]
when:
ref:
- "refs/tags/**"
@ -841,9 +725,7 @@ depends_on:
- testing
- release
- deploy-docs
- docker-arm-release
- docker-amd64-release
- docker-manifest
- docker-release
steps:
- name: notify
@ -861,6 +743,6 @@ steps:
- failure
---
kind: signature
hmac: 5500acb776acae4975592637767035c45af277f1f56c8d10ffd99f38761cd5c8
hmac: d47bd1cf6f3e9be2ff3eed2039e65c8b6de2b16c1e636699f66382f941277411
...

View File

@ -1,58 +0,0 @@
name: Bug Report
description: Found something you weren't expecting? Report it here!
labels: kind/bug
body:
- type: markdown
attributes:
value: |
NOTE: If your issue is a security concern, please send an email to security@vikunja.io instead of opening a public issue.
- type: markdown
attributes:
value: |
Please fill out this issue template to report a bug.
1. If you want to propose a new feature, please open a discussion thread in the forum: https://community.vikunja.io
2. Please ask questions or configuration/deploy problems on our [Matrix Room](https://matrix.to/#/#vikunja:matrix.org) or forum (https://community.vikunja.io).
3. Make sure you are using the latest release and
take a moment to check that your issue hasn't been reported before.
4. Please give all relevant information below for bug reports, because
incomplete details will be handled as an invalid report and closed.
- type: textarea
id: description
attributes:
label: Description
description: |
Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see below).
- type: input
id: frontend-version
attributes:
label: Vikunja Frontend Version
description: Vikunja frontend version (or commit reference) of your instance
validations:
required: true
- type: input
id: api-version
attributes:
label: Vikunja API Version
description: Vikunja API version (or commit reference) of your instance
validations:
required: true
- type: input
id: browser-version
attributes:
label: Browser and version
description: If your issue is related to a frontend problem, please provide the browser and version you used to reproduce it.
- type: dropdown
id: can-reproduce
attributes:
label: Can you reproduce the bug on the Vikunja demo site?
options:
- "Yes"
- "No"
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If this issue involves the Web Interface, please provide one or more screenshots

3
.github/FUNDING.yml vendored
View File

@ -1,2 +1,3 @@
github: kolaente
custom: https://www.buymeacoffee.com/kolaente
open_collective: vikunja
custom: ["https://vikunja.cloud", "https://www.buymeacoffee.com/kolaente"]

1
.gitignore vendored
View File

@ -27,3 +27,4 @@ vikunja-dump*
vendor/
os-packages/
mage_output_file.go
pkg/swagger/*

View File

@ -79,6 +79,8 @@ issues:
- path: pkg/routes/api/v1/docs.go
linters:
- goheader
- misspell
- gosmopolitan
- text: "Missed string"
linters:
- goheader
@ -88,3 +90,16 @@ issues:
- path: pkg/models/favorites\.go
linters:
- nilerr
- path: pkg/models/project\.go
text: "string `parent_project_id` has 3 occurrences, make it a constant"
- path: pkg/models/events\.go
linters:
- musttag
- path: pkg/models/task_collection.go
text: 'append result not assigned to the same slice'
- text: 'string `label_id` has 3 occurrences, make it a constant'
linters:
- goconst
- text: 'string `labels` has 3 occurrences, make it a constant'
linters:
- goconst

View File

@ -7,6 +7,543 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
All releases can be found on https://code.vikunja.io/api/releases.
## [0.21.0] - 2023-07-07
### Bug Fixes
* *(CalDAV)* Naming
* *(api)* License (#1457)
* *(build)* Make sure the docker image can access go tools
* *(caldav)* Do not create label if it exists by title (#1444)
* *(caldav)* Incoming tasks do not get correct time zone (#1455)
* *(ci)* Pipeline dependency
* *(cli)* Rename user project command
* *(docker)* Don't chown everything in Vikunja's default root folder
* *(docs)* Added Keycloak OpenID example (#1521)
* *(docs)* Clarify error codes in swagger docs
* *(docs)* Link to usage/api
* *(docs)* Semver link (#1470)
* *(filter)* Don't try to get the real subscription for a saved filter project
* *(filters)* Return all filters with all projects, not grouped under a pseudo project
* *(filters)* Sorting tasks from filters
* *(image)* Json type of struct property (#1469)
* *(import)* Don't try to load a nonexistant attachment file
* *(lint)* Disable misspell linter on redoc
* *(migration)* Don't try to fetch task details of tasks whose projects are deleted
* *(migration)* Enable insert from structure work recursively
* *(migration)* Make file migration work with new structure
* *(migration)* Remove unused is_deleted flag from Todoist api response
* *(migration)* Remove wunderlist leftovers
* *(migration)* Remove wunderlist leftovers
* *(migration)* Remove wunderlist leftovers
* *(migration)* Rename TickTick migration
* *(migration)* Revert wrongly changed url
* *(migration)* Use correct struct
* *(project)* Don't allow un-archiving a project when its parent project is archived
* *(project)* Don't check for namespaces in overdue reminders
* *(project)* Duplicate project into parent project
* *(project)* Recursively get all users from all parent projects
* *(project)* Remove comments, clarifications, notifications about namespaces
* *(project)* Remove namespaces checks
* *(project)* Remove namespaces from creating projects
* *(project)* Remove namespaces from getting projects
* *(projects)* Delete project in the correct order
* *(projects)* Don't allow making a project child of itself
* *(projects)* Don't check if new projects are archived
* *(projects)* Don't fail to fetch a task if there's a broken subscription record associated to it
* *(projects)* Don't return child projects twice
* *(projects)* Don't try to share for nonexisting namespace
* *(projects)* Permission check now works
* *(projects)* Properly check if a user or link share is allowed to create a new project
* *(projects)* Recalculate project's position after dragging when position would be 0
* *(projects)* Reset pagination limit when fetching subprojects
* *(projects)* Return subprojects which were shared from another user
* *(saved filters)* Don't let query parameters override saved sorting parameters
* *(spelling)* In config sample (#1489)
* *(task)* Don't build partial task identifier
* *(task)* Don't try to return a project identifier if there is no project
* *(tasks)* Don't check for namespaces in filters
* *(tasks)* Get all tasks from parent projects
* *(tasks)* Make sure task deleted notification actually has information about the deleted task
* *(tasks)* Read all tests
* *(tasks)* Return a correct task identifier if the list does not have a good one set
* *(tasks)* Sql for overdue reminders
* *(tasks)* Task relation test
* *(test)* Adjust fixture bucket and list ids
* *(test)* Adjust fixture id
* *(test)* Fixtures
* *(test)* Use correct filter id
* *(tests)* Adjust parent projects
* *(tests)* Make the tests compile again
* *(tests)* Permission tests for parent projects
* *(tests)* Subscription test fixtures
* *(tests)* Task collection fixtures
* *(tests)* Task permissions from parents
* Accept for migrations ([8edbca3](8edbca39cf9d771645d6feb05ee94eebc6403cbf))
* Add missing error code ([f2d943f](f2d943f5c4f1b13ef565692b893da05c6669c6d0))
* Add missing license header ([f4e12da](f4e12dab273474c0eb27f59c00faa828bb86522c))
* Align "ID" param for Delete and Update method of Task model ([b6d5605](b6d5605ef6b2799f939d016b1572b3d43e857d4d))
* Align "otherTaskID" param for Delete method of TaskRelation model ([ac377a7](ac377a7a5d708ef7543d99f716ceaa1ee8502649))
* Align namespaceID param ([7ada82e](7ada82ea926556ae39d106dc85d5a05f3c1c8cd3))
* Align task ID param ([f76bb2b](f76bb2b4a9c8a3b53bc73d0913ba94bba350f5da))
* Check if usernames contain spaces when creating a new user ([672fb35](672fb35bcbb47e4c0331813aa837fee28f372471))
* Compile errors ([a21bff3](a21bff3ffb8497d6e1b6c3bb50d9a9b2469f4eb0))
* Correctly pass unix socket to xorm ([7ad256f](7ad256f6cd3e15aeafce2bc29c28c458c3abdc0a))
* Docs auth openID method ([4f7d69a](4f7d69a108a2836e90b3c7ffe7f05247d80bfb85))
* Don't get favorite task projects filter multiple times ([a51bbd1](a51bbd1159fb1ada5980a5b27972ccf1404641af))
* Don't send bad request errors to sentry ([c0c523f](c0c523f0a8c83eb164febbc508ac98142d572d7a))
* Don't try to load subscriptions for nonexistent projects ([b519462](b5194624e021360ccdec20cb58bba57c23028c3f))
* Fetch all tasks for all projects ([353279c](353279cbff8fd6fa6b1bb81a8726a7a5a1b6b623))
* ILIKE helper ([dff4e01](dff4e01327907d42bf0b20a20912e5e9c69dd23e))
* Lint ([50c922b](50c922b7d1135b8f75478b89502fe0bb4c39547f))
* Lint ([ad06903](ad0690369f39dab3683ac5ef7664bd765fa1cb18))
* Lint ([e17b63b](e17b63b9201889946e91e7e295f31a80055c6ae4))
* Lint ([ef779e8](ef779e8730af169101bf1ebffb8d2522e5c6b7bc))
* Lint ([f0dcce7](f0dcce702f03f237ecde107a7ba62f61e2c3e313))
* Lint config ([9111db2](9111db2a16df6a4eec9e3cc2021bc6fdcace9ead))
* Lint errors ([ebc3dd2](ebc3dd2b3e72f56880320480829aead1bf554f67))
* Make it compile again ([d79c393](d79c393e5b4e880b8b09ce5944e8247ae07c4d58))
* Make sure Vikunja is buildable without swagger docs present ([47e4223](47e42238ef47ad6e4e90284593aae278e77c8631))
* Make sure projects are correctly sorted ([db3c7aa](db3c7aa8b04e828fafdf10bcfd5bde8cf19e6f10))
* Provide a proper error message when viewing a link share with an invalid token ([aa43127](aa43127e52aeb7412b13b4aaab091442dad534db))
* Reminder fixture ([4b00f22](4b00f224d92f0c6933f6cba14433538d64545eca))
* Remove old saved openid provider settings from cache when starting Vikunja ([9bf535d](9bf535d06f5b9bb455979b0bf3b6f0942daa1c9e))
* Rename after rebase ([e93a5ff](e93a5ff11fee7adac2897b3251db7abbbad4bcc5))
* Rename incorrectly named ProjectUsers method ([7e53a21](7e53a214070ee9b48fdffffcc42de9250c323e96))
* Rename project receiver variable ([f1cbe50](f1cbe50605b46e506c3233cc8da4b325f5727c87))
* Spelling ([fc2cc4a](fc2cc4a1555ca7e63ff902cde62380035a60ebb8))
* Test fixtures ([06f1d2e](06f1d2e91237195f8e720d4dd55b491b91e6547d))
* Test import ([fb818ea](fb818ea1867f8db813ff52622695fd206c21452e))
* Trello import tests ([61a3380](61a3380a9482312eac56f4cfd436517205f601aa))
* Typo ([4c698dc](4c698dc7c71418239e24b1756604371dcb6a2f74))
* Typo in email template ([2dad404](2dad4042170677af3db7be85cbe978ce6be721aa))
* Update redoc ([8916de0](8916de03666482c2319689e950d30a6fb737f239))
* Update xgo in dockerfile to 1.20.2 ([33f0d0f](33f0d0f85a7fdfd509bc8a4aad26df95c064468c))
* Upgrade jwt v5 ([359d051](359d0512cc7e73cdde9d4dd145332591c6743d11))
* Use rewrite when hosting frontend files via the api ([b56e45d](b56e45d74389d38c747887d3cb2a2b295bb549c7))
* Users_lists name in migration ([0a3fdc0](0a3fdc0344790f059140d8e482b028ffecdb3e4b))
* Using mysql via a socket ([0a6bbc2](0a6bbc2efd6bb4468c72cff2a70cd29350a50b75))
### Dependencies
* *(deps)* Update module github.com/imdario/mergo to v0.3.14
* *(deps)* Update github.com/arran4/golang-ical digest to 19abf92
* *(deps)* Update goreleaser/nfpm docker tag to v2.27.1 (#1438)
* *(deps)* Update module github.com/swaggo/swag to v1.8.11
* *(deps)* Update module github.com/imdario/mergo to v0.3.15 (#1443)
* *(deps)* Update golangci-lint to 1.52.1
* *(deps)* Update module github.com/wneessen/go-mail to v0.3.9
* *(deps)* Update github.com/gocarina/gocsv digest to 9a18a84
* *(deps)* Update module github.com/swaggo/swag to v1.8.12
* *(deps)* Update module github.com/getsentry/sentry-go to v0.20.0
* *(deps)* Update module github.com/redis/go-redis/v9 to v9.0.3
* *(deps)* Update goreleaser/nfpm docker tag to v2.28.0 (#1475)
* *(deps)* Update src.techknowlogick.com/xgo digest to bff48e4 (#1474)
* *(deps)* Update module golang.org/x/sys to v0.7.0
* *(deps)* Update github.com/gocarina/gocsv digest to 6445c2b
* *(deps)* Update module golang.org/x/term to v0.7.0
* *(deps)* Update module github.com/spf13/cobra to v1.7.0
* *(deps)* Update module golang.org/x/image to v0.7.0
* *(deps)* Update module golang.org/x/oauth2 to v0.7.0
* *(deps)* Update module golang.org/x/crypto to v0.8.0
* *(deps)* Update module github.com/prometheus/client_golang to v1.15.0
* *(deps)* Update module github.com/lib/pq to v1.10.8
* *(deps)* Update module github.com/go-sql-driver/mysql to v1.7.1
* *(deps)* Update module github.com/lib/pq to v1.10.9
* *(deps)* Update src.techknowlogick.com/xgo digest to e65295a
* *(deps)* Update github.com/arran4/golang-ical digest to f69e132
* *(deps)* Update module github.com/redis/go-redis/v9 to v9.0.4
* *(deps)* Update module github.com/go-testfixtures/testfixtures/v3 to v3.9.0
* *(deps)* Update module github.com/prometheus/client_golang to v1.15.1
* *(deps)* Update module golang.org/x/term to v0.8.0
* *(deps)* Update src.techknowlogick.com/xgo digest to 52d704d
* *(deps)* Update module github.com/swaggo/swag to v1.16.1
* *(deps)* Update module golang.org/x/sync to v0.2.0
* *(deps)* Update module github.com/getsentry/sentry-go to v0.21.0
* *(deps)* Update module golang.org/x/oauth2 to v0.8.0
* *(deps)* Update module golang.org/x/crypto to v0.9.0
* *(deps)* Update alpine docker tag to v3.18
* *(deps)* Update github.com/gocarina/gocsv digest to 7f30c79
* *(deps)* Update module github.com/magefile/mage to v1.15.0
* *(deps)* Update github.com/gocarina/gocsv digest to 9ddd7fd
* *(deps)* Update module github.com/coreos/go-oidc/v3 to v3.6.0
* *(deps)* Update module github.com/stretchr/testify to v1.8.3
* *(deps)* Update module github.com/labstack/echo-jwt/v4 to v4.2.0
* *(deps)* Update goreleaser/nfpm docker tag to v2.29.0 (#1528)
* *(deps)* Update module github.com/ulule/limiter/v3 to v3.11.2
* *(deps)* Update module github.com/redis/go-redis/v9 to v9.0.5
* *(deps)* Update module github.com/imdario/mergo to v0.3.16
* *(deps)* Update module github.com/stretchr/testify to v1.8.4
* *(deps)* Update module github.com/spf13/viper to v1.16.0
* *(deps)* Update github.com/vectordotdev/go-datemath digest to 640a500 (#1532)
* *(deps)* Update module github.com/mattn/go-sqlite3 to v1.14.17
* *(deps)* Update klakegg/hugo docker tag to v0.110.0 (#1538)
* *(deps)* Update golangci
* *(deps)* Update klakegg/hugo docker tag to v0.111.0 (#1539)
* *(deps)* Update klakegg/hugo docker tag to v0.111.3 (#1542)
* *(deps)* Update src.techknowlogick.com/xgo digest to 494bc06
* *(deps)* Update goreleaser/nfpm docker tag to v2.30.1 (#1540)
* *(deps)* Update module golang.org/x/sys to v0.9.0
* *(deps)* Update module golang.org/x/term to v0.9.0
* *(deps)* Update module golang.org/x/image to v0.8.0
* *(deps)* Update module golang.org/x/crypto to v0.10.0
* *(deps)* Update module golang.org/x/oauth2 to v0.9.0
* *(deps)* Update module golang.org/x/sync to v0.3.0
* *(deps)* Update github.com/gocarina/gocsv digest to 2696de6
* *(deps)* Update module github.com/prometheus/client_golang to v1.16.0
* *(deps)* Update module github.com/getsentry/sentry-go to v0.22.0
* *(deps)* Update github.com/gocarina/gocsv digest to 99d496c
* *(deps)* Update module github.com/imdario/mergo to v1 (#1559)
* *(deps)* Update github.com/dustinkirkland/golang-petname digest to e794b93
* *(deps)* Update module golang.org/x/sys to v0.10.0
* *(deps)* Update module golang.org/x/image to v0.9.0
* *(deps)* Update module golang.org/x/term to v0.10.0
* *(deps)* Update module golang.org/x/crypto to v0.11.0
* *(deps)* Update module golang.org/x/oauth2 to v0.10.0
### Documentation
* Add docs for installing with sqlite in docker (#70) ([a16fd67](a16fd67b51c02e09ef6709bee9ad2b341d80cd73))
* Add information about our Helm Chart ([22f89c1](22f89c1ccc3a281a75db9e42702604f88eb0568b))
* Fix menu links ([1f13b5d](1f13b5d7b4041042ea3b26ac2a850784b11ac377))
* Remove all traces of namespaces ([3b0935d](3b0935d033c6b5060f18e955acf4a647eb10721b))
* Remove outdated information ([327bb3b](327bb3bed99e0a4c5664251e3af15accf1a13062))
* Update error references to list ([259cf7d](259cf7d25bbb7a289fe9569c81c6f7d3855543bf))
* Update prometheus docs for clarity (#1458)
* Update references to list ([8dc6c95](8dc6c95333b38eb83c8053c628d05599e79dd27e))
### Features
* *(caldav)* Sync Reminders / VALARM (#1415)
* *(docs)* Change order of sections in nav (#1471)
* *(docs)* Various improvements
* *(kanban)* Return the total task count per bucket
* *(migration)* Ignore namespace changes
* *(migration)* Use new structure for migration
* *(projects)* Add parent project, migrate namespaces
* *(projects)* Check all parent projects for permissions
* *(projects)* Check parent project when checking archived status
* *(projects)* Cleanup namespace leftovers
* *(projects)* Don't allow deleting or archiving the default project
* *(projects)* Get all projects recursively
* *(projects)* Remove namespaces
* *(projects)* Return a favorites pseudo project when the user has favorite tasks
* *(subscriptions)* Make sure all subscriptions are inherited properly
* *(users)* Don't hide user email if it was the search request* Rename lists to projects ([349e6a5](349e6a59050a0beba82a7f626c2f72f6b8c88dde))
* Add logging options to mailer settings ([9590b82](9590b82c11852666524eeab562988226574a1b1c))
* Add relative Reminders (#1427) ([3f5252d](3f5252dc24a3dea89b2e049ccb1f9d0a59a89a88))
* Add token example ([4417223](441722372af3349b677dc013b1863e678b0e7158))
* Allow saving frontend settings via api ([04e2c51](04e2c51fac24a045abe1a85c8b661b6bc628686c))
* Allow to find users with access to a project more freely ([a7231e1](a7231e197e3d86d3ef27fad89ae60863d25b5df0))
* Check for cycles when creating or updating a project's parent ([9011894](9011894a2975d9d112dc3db453739e13261c0716))
* Generate swagger docs at build time ([efa24ce](efa24cec44865c5a8ab42a106deeb331ad1bed91))
* Improve relation kinds docs ([b826c13](b826c13f385b24ed1b33b8890cc5cdd5fe8b8f22))
* Make the new inbox project the default ([0110f93](0110f933134af0460d9fed9d652148c98e94b6cd))
* Migrate lists to projects in db identifiers ([2fba7bd](2fba7bdf02983e5cf7def09803def4cbf830f53b))
* Remove ChildProjects project property ([edcb806](edcb806421c2181a8b85aed5b53e8da6350b9630))
* Remove namespaces, make projects infinitely nestable (#1362) ([82beb3b](82beb3bf671ca0670b714160f0b4d9c186dfe120))
* Rename all list files ([8f4abd2](8f4abd2fe86e7a23d80bc5ebc4fc1ae75e1b78fb))
* Rename lists to projects ([47c2da7](47c2da7f1856e95956cdb968fa95295d3441a9f6))
* Rename lists to projects ([96a0f5e](96a0f5e169c9e8f8d20e3fe1d9de5eecead53ac9))
* Rename lists to projects ([fc73c84](fc73c84bf2b9a7cbd2f6cbd2a83ea9ccc3fd58fd))
* Rename lists to projects everywhere (#1318) ([869d4a3](869d4a336cb122df894acf040e02b6b2ba786fdb))
### Miscellaneous Tasks
* *(changelog)* Fix spelling
* *(docs)* Add info about `/buckets` sorting
* *(docs)* Move login and register routes to auth category in api docs
* *(docs)* Update error docs
* *(docs)* Update list -> project
* *(docs/translation)* Remove mention of weblate
* *(export)* Remove unused events
* *(project)* Fmt
* *(projects)* use a slice again ([3e8d1b3](3e8d1b3667ccfb2960650a4506771ec3c9b3a970))
* *(test)* Show table content when db assertion failed
* Cleanup ([7a9611c](7a9611c2daa41ec2da135a2a4e804551e4ab8ff2))
* Disable false-positive linter for generated docs ([076e857](076e857507a4cf59e0b0399a2e51a8d8baa03065))
* Fix comment url ([5856f21](5856f21f31fe7b81e7ffd203f70460785955411c))
* Fix spelling ([cd90db3](cd90db3117a7fa40175ecebd3ca37cc94a46e1ee))
* Generate swagger docs ([55410ea](55410ea73d50f5bc124eaf411c77125024b6fefa))
* Go mod tidy ([93056da](93056da792dafa70f91f7d114669997b3f93f7f1))
* Go mod tidy ([e5dde31](e5dde315fb6a7163546b9f88ebafacc886744db3))
* Remove cache options ([d83e3a0](d83e3a0a037b9a4d40ce22c8c51932eb23963ac2))
* Remove reminderDates after frontend is migrated to reminders (#1448) ([4a4ba04](4a4ba041e0f3e9c71dd4844d5191c9cbe4e4e3b7))
* Rename files (fix typo) ([6aadaaa](6aadaaaffc1fff4a94e35e8fa3f6eab397cbc3ce))
## [0.20.4] - 2023-03-12
### Bug Fixes
* *(docker)* Allow non-unique group id
### Documentation
* Add link to tutorial for installing Vikunja on Synology ([4de0efe](4de0efec1dd7da95dbf936728d7e23791396a63a))
## [0.20.3] - 2023-03-10
### Bug Fixes
* *(build)* Downgrade xgo to 1.19.2 so that builds work again
* *(caldav)* Add Z suffix to dates make it clear dates are in UTC
* *(caldav)* Use const for repeat modes
* *(caldav)* Make sure only labels where the user has permission to use them are used
* *(ci)* Pipeline dependency
* *(ci)* Pin nfpm container version and binary location
* *(ci)* Set release path to /source
* *(ci)* Tagging logic for release docker images
* *(ci)* Save generated .tags file to correctly tag docker releases
* *(ci)* Sign drone config
* *(docd)* Update Subdirectory Documentation (#1363)
* *(docker)* Cross compilation with buildx
* *(docker)* Re-add expose
* *(docker)* Passing environment variables into the container
* *(docker)* Make sure the vikunja user always exists and only modify the uid instead of recreating the user
* *(docs)* Add docs about cli user delete
* *(docs)* Old helm charts url (#1344)
* *(docs)* Fix a few minor typos (#59)
* *(docs)* Fix traefik v2 example (#65)
* *(docs)* Clarify support for caldav reccurrence
* *(drone)* Add type, fix pull, remove group (#1355)
* *(dump)* Make sure null dates are properly set when restoring from a dump
* *(export)* Ignore file size for export files
* *(list)* Return lists for a namespace id even if that namespace is deleted
* *(list)* When list background is removed, delete file from file system and DB (#1372)
* *(mailer)* Forcessl config (#60)
* *(migration)* Use Todoist v9 api to migrate tasks from them
* *(migration)* Import TickTick data by column name instead of index (#1356)
* *(migration)* Use the proper authorization method for Todoist's api, fix issues with importing deleted items
* *(migration)* Remove unused todoist parameters
* *(migration)* Todoist pagination now avoids too many loops
* *(migration)* Don't try to add nonexistent tasks as related
* *(migration)* Make sure trello checklists are properly imported
* *(reminders)* Overdue tasks join condition
* *(reminders)* Make sure an overdue reminder is sent when there is only one overdue task
* *(reminders)* Prevent duplicate reminders when updating task details
* *(restore)* Check if we're really dealing with a string
* *(task)* Make sure the task's last updated timestamp is always updated when releated entities changed
* *(task)* Correctly load tasks by id and uuid in caldav
* *(tasks)* Don't include undone overdue tasks from archived lists or namespaces in notification mails
* *(tasks)* Don't reset the kanban bucket when updating a task and not providing one
* *(tasks)* Don't set a repeating task done when moving it do the done bucket
* *(tasks)* Recalculate position of all tasks in a list or bucket when it would hit 0
* *(tasks)* Make sure tasks are sorted by position before recalculating them
* *(user)* Make reset the user's name to empty actually work
* Swagger docs ([96b5e93](96b5e933796275e87f3007e31db0623688dbdb3a))
* Restore notifications table from dump when it already had the correct format ([8c67be5](8c67be558f697ab52740c51ab453092c0f8f7c14))
* Make sure labels are always exported as caldav (#1412) ([1afc72e](1afc72e1906c02b093bb6d9748235b93ab0eb181))
* Lint ([491a142](491a1423788b76f236d070071cb46f5b2f5d3fd0))
* Lint ([20a5994](20a5994b1717e7751750f14a9a164825a8e6ade6))
* Lint ([077baba](077baba2eaff2f10b97384f07375ece7f51ec0fa))
* Lint ([9f14466](9f14466dfa8660362a4e51b3c8c6810bf8d66a22))
### Dependencies
* *(deps)* Update module github.com/yuin/goldmark to v1.5.3 (#1317)
* *(deps)* Update module golang.org/x/crypto to v0.2.0 (#1315)
* *(deps)* Update module github.com/spf13/afero to v1.9.3 (#1320)
* *(deps)* Update module golang.org/x/crypto to v0.3.0 (#1321)
* *(deps)* Update github.com/arran4/golang-ical digest to a677353 (#1323)
* *(deps)* Update module github.com/wneessen/go-mail to v0.3.5 (#1325)
* *(deps)* Update github.com/arran4/golang-ical digest to 1093469 (#1326)
* *(deps)* Update module github.com/golang-jwt/jwt/v4 to v4.4.3 (#1328)
* *(deps)* Update module github.com/go-sql-driver/mysql to v1.7.0 (#1332)
* *(deps)* Update module golang.org/x/sys to v0.3.0 (#1333)
* *(deps)* Update module golang.org/x/term to v0.3.0 (#1336)
* *(deps)* Update module golang.org/x/image to v0.2.0 (#1335)
* *(deps)* Update module golang.org/x/oauth2 to v0.2.0 (#1316)
* *(deps)* Update module golang.org/x/oauth2 to v0.3.0 (#1337)
* *(deps)* Update module github.com/getsentry/sentry-go to v0.16.0 (#1338)
* *(deps)* Update module golang.org/x/crypto to v0.4.0 (#1339)
* *(deps)* Update module github.com/pquerna/otp to v1.4.0 (#1341)
* *(deps)* Update module github.com/swaggo/swag to v1.8.9 (#1327)
* *(deps)* Update module github.com/wneessen/go-mail to v0.3.6 (#1342)
* *(deps)* Update module github.com/labstack/echo/v4 to v4.10.0 (#1343)
* *(deps)* Update module github.com/wneessen/go-mail to v0.3.7 (#1348)
* *(deps)* Update module github.com/coreos/go-oidc/v3 to v3.5.0 (#1349)
* *(deps)* Update module golang.org/x/sys to v0.4.0 (#1351)
* *(deps)* Update module golang.org/x/image to v0.3.0 (#1350)
* *(deps)* Update module golang.org/x/term to v0.4.0 (#1352)
* *(deps)* Update module golang.org/x/crypto to v0.5.0 (#1353)
* *(deps)* Update goreleaser/nfpm docker tag to v2.23.0 (#1347)
* *(deps)* Update module github.com/wneessen/go-mail to v0.3.8 (#1357)
* *(deps)* Update module src.techknowlogick.com/xgo to v1.6.0+1.19.5 (#1358)
* *(deps)* Update klakegg/hugo docker tag to v0.107.0 (#1272)
* *(deps)* Update module github.com/getsentry/sentry-go to v0.17.0 (#1361)
* *(deps)* Update module src.techknowlogick.com/xgo to v1.7.0+1.19.5 (#1364)
* *(deps)* Update module github.com/spf13/viper to v1.15.0 (#1365)
* *(deps)* Update module github.com/labstack/echo-jwt/v4 to v4.0.1 (#1369)
* *(deps)* Update module golang.org/x/oauth2 to v0.4.0 (#1354)
* *(deps)* Update github.com/gocarina/gocsv digest to 763e25b (#1370)
* *(deps)* Update goreleaser/nfpm docker tag to v2.24.0 (#1367)
* *(deps)* Update module github.com/swaggo/swag to v1.8.10 (#1371)
* *(deps)* Update module github.com/go-redis/redis/v8 to v9 (#1377)
* *(deps)* Update module github.com/labstack/echo-jwt/v4 to v4.1.0
* *(deps)* Update module github.com/ulule/limiter/v3 to v3.11.0 (#1378)
* *(deps)* Update module github.com/redis/go-redis/v9 to v9.0.2
* *(deps)* Update goreleaser/nfpm docker tag to v2.25.0 (#1382)
* *(deps)* Upgrade golangci-lint to 1.51.0
* *(deps)* Update module github.com/yuin/goldmark to v1.5.4
* *(deps)* Update module go to 1.20
* *(deps)* Update xgo to 1.20
* *(deps)* Update module golang.org/x/sys to v0.5.0
* *(deps)* Update module github.com/getsentry/sentry-go to v0.18.0 (#1386)
* *(deps)* Update module golang.org/x/term to v0.5.0
* *(deps)* Update module golang.org/x/crypto to v0.6.0
* *(deps)* Update module golang.org/x/oauth2 to v0.5.0
* *(deps)* Update module golang.org/x/image to v0.4.0
* *(deps)* Update goreleaser/nfpm docker tag to v2.26.0 (#1394)
* *(deps)* Update github.com/arran4/golang-ical digest to 07c6aad
* *(deps)* Update module github.com/threedotslabs/watermill to v1.2.0 (#1384)
* *(deps)* Update module golang.org/x/image to v0.5.0 (#1396)
* *(deps)* Update golang.org/x/net to 0.7.0
* *(deps)* Update module github.com/golang-jwt/jwt/v4 to v4.5.0 (#1399)
* *(deps)* Update github.com/gocarina/gocsv digest to bcce7dc
* *(deps)* Update golangci-lint to 1.51.2
* *(deps)* Update module github.com/labstack/echo/v4 to v4.10.1
* *(deps)* Update github.com/gocarina/gocsv digest to bee85ea
* *(deps)* Update module github.com/labstack/echo/v4 to v4.10.2
* *(deps)* Update module github.com/spf13/afero to v1.9.4
* *(deps)* Update github.com/gocarina/gocsv digest to dc4ee9d
* *(deps)* Update module github.com/stretchr/testify to v1.8.2
* *(deps)* Update github.com/gocarina/gocsv digest to 70c27cb
* *(deps)* Update module golang.org/x/sys to v0.6.0
* *(deps)* Update module golang.org/x/term to v0.6.0
* *(deps)* Update module golang.org/x/crypto to v0.7.0
* *(deps)* Update module golang.org/x/oauth2 to v0.6.0
* *(deps)* Update module golang.org/x/image to v0.6.0
* *(deps)* Update github.com/kolaente/caldav-go digest to 2a4eb8b
* *(deps)* Remove fsnotify replacement
* *(deps)* Update github.com/vectordotdev/go-datemath digest to f3954d0
* *(deps)* Update src.techknowlogick.com/xgo digest to 44f7e66
* *(deps)* Update module github.com/getsentry/sentry-go to v0.19.0
* *(deps)* Update module github.com/spf13/afero to v1.9.5
* *(deps)* Update module github.com/ulule/limiter/v3 to v3.11.1
* *(deps)* Update src.techknowlogick.com/xgo digest to b607086
* *(deps)* Update module github.com/gabriel-vasile/mimetype to v1.4.2
### Features
* *(background)* Add Last-Modified header (#1376)
* *(caldav)* Add support for repeating tasks
* *(caldav)* Export Labels to CalDAV (#1409)
* *(caldav)* Import caldav categories as Labels (#1413)
* *(migrators)* Remove wunderlist (#1346)
* *(release)* Use compressed binaries for package releases
* Use docker buildx to build multiarch images ([a6e214b](a6e214b654f28836cc8b93683dbfd5999282d11c))
* Provide logout url for openid providers (#1340) ([a79b1de](a79b1de2d0247a424f49cecaa267d30e8fa70a83))
* Refactored Dockerfile (#1375) ([522bf7d](522bf7d2fc3cc1704f58299b6435baccc7add533))
* Disable events log by default ([da9d25c](da9d25cf727c56acd7394b4b74e17a2959ee5242))
- **BREAKING**: events log level is now off unless explicitly enabled
### Miscellaneous Tasks
* *(docs)* Adjust docs about frontend docker container
* *(docs)* Remove sponsors
* *(task)* Add test to check if a task's reminders are duplicated
* Remove custom gitea bug template in favor of githubs ([4fa45bf](4fa45bf9dcbaa8a41a53fc2305c4c2c1aa15691c))
* 0.20.2 release preperations ([d19fc80](d19fc80b8be08673136d84e10187cadb293822bf))
* Update funding links ([aa25ccd](aa25ccdc917684583a9bff4b7cb272004386f0fa))
### Other
* *(other)* Added Google & Google Workspace to OpenId examples (#1319)
## [0.20.2] - 2023-01-24
### Bug Fixes
* *(build)* Downgrade xgo to 1.19.2 so that builds work again
* *(caldav)* Add Z suffix to dates make it clear dates are in UTC
* *(caldav)* Use const for repeat modes
* *(ci)* Pipeline dependency
* *(ci)* Pin nfpm container version and binary location
* *(ci)* Set release path to /source
* *(ci)* Tagging logic for release docker images
* *(docs)* Add docs about cli user delete
* *(docs)* Old helm charts url (#1344)
* *(docs)* Fix a few minor typos (#59)
* *(drone)* Add type, fix pull, remove group (#1355)
* *(dump)* Make sure null dates are properly set when restoring from a dump
* *(export)* Ignore file size for export files
* *(list)* Return lists for a namespace id even if that namespace is deleted
* *(mailer)* Forcessl config (#60)
* *(migration)* Use Todoist v9 api to migrate tasks from them
* *(migration)* Import TickTick data by column name instead of index (#1356)
* *(migration)* Use the proper authorization method for Todoist's api, fix issues with importing deleted items
* *(reminders)* Overdue tasks join condition
* *(reminders)* Make sure an overdue reminder is sent when there is only one overdue task
* *(reminders)* Prevent duplicate reminders when updating task details
* *(restore)* Check if we're really dealing with a string
* *(tasks)* Don't include undone overdue tasks from archived lists or namespaces in notification mails
* *(tasks)* Don't reset the kanban bucket when updating a task and not providing one
* *(tasks)* Don't set a repeating task done when moving it do the done bucket
* *(user)* Make reset the user's name to empty actually work* Swagger docs ([41c9e3f](41c9e3f9a47280887b56941280904aea6ef31f85))
* Restore notifications table from dump when it already had the correct format ([15811fd](15811fd4d4485cd25cf8d2f8fdd04ebfea8e6663))
### Dependencies
* *(deps)* Update module github.com/yuin/goldmark to v1.5.3 (#1317)
* *(deps)* Update module golang.org/x/crypto to v0.2.0 (#1315)
* *(deps)* Update module github.com/spf13/afero to v1.9.3 (#1320)
* *(deps)* Update module golang.org/x/crypto to v0.3.0 (#1321)
* *(deps)* Update github.com/arran4/golang-ical digest to a677353 (#1323)
* *(deps)* Update module github.com/wneessen/go-mail to v0.3.5 (#1325)
* *(deps)* Update github.com/arran4/golang-ical digest to 1093469 (#1326)
* *(deps)* Update module github.com/golang-jwt/jwt/v4 to v4.4.3 (#1328)
* *(deps)* Update module github.com/go-sql-driver/mysql to v1.7.0 (#1332)
* *(deps)* Update module golang.org/x/sys to v0.3.0 (#1333)
* *(deps)* Update module golang.org/x/term to v0.3.0 (#1336)
* *(deps)* Update module golang.org/x/image to v0.2.0 (#1335)
* *(deps)* Update module golang.org/x/oauth2 to v0.2.0 (#1316)
* *(deps)* Update module golang.org/x/oauth2 to v0.3.0 (#1337)
* *(deps)* Update module github.com/getsentry/sentry-go to v0.16.0 (#1338)
* *(deps)* Update module golang.org/x/crypto to v0.4.0 (#1339)
* *(deps)* Update module github.com/pquerna/otp to v1.4.0 (#1341)
* *(deps)* Update module github.com/swaggo/swag to v1.8.9 (#1327)
* *(deps)* Update module github.com/wneessen/go-mail to v0.3.6 (#1342)
* *(deps)* Update module github.com/labstack/echo/v4 to v4.10.0 (#1343)
* *(deps)* Update module github.com/wneessen/go-mail to v0.3.7 (#1348)
* *(deps)* Update module github.com/coreos/go-oidc/v3 to v3.5.0 (#1349)
* *(deps)* Update module golang.org/x/sys to v0.4.0 (#1351)
* *(deps)* Update module golang.org/x/image to v0.3.0 (#1350)
* *(deps)* Update module golang.org/x/term to v0.4.0 (#1352)
* *(deps)* Update module golang.org/x/crypto to v0.5.0 (#1353)
* *(deps)* Update goreleaser/nfpm docker tag to v2.23.0 (#1347)
* *(deps)* Update module github.com/wneessen/go-mail to v0.3.8 (#1357)
* *(deps)* Update module src.techknowlogick.com/xgo to v1.6.0+1.19.5 (#1358)
* *(deps)* Update klakegg/hugo docker tag to v0.107.0 (#1272)
* *(deps)* Update module github.com/getsentry/sentry-go to v0.17.0 (#1361)
* *(deps)* Update module src.techknowlogick.com/xgo to v1.7.0+1.19.5 (#1364)
* *(deps)* Update module github.com/spf13/viper to v1.15.0 (#1365)
* *(deps)* Update module github.com/labstack/echo-jwt/v4 to v4.0.1 (#1369)
### Features
* *(migrators)* Remove wunderlist (#1346)
* *(release)* Use compressed binaries for package releases
* Use docker buildx to build multiarch images ([9bd6795](9bd6795266fd54ae42664c20ed7633ac7daf6199))
### Miscellaneous Tasks
* Remove custom gitea bug template in favor of githubs ([7b1e1c7](7b1e1c79e358f3fcecb217259491f016402cdcc7))
### Other
* *(other)* Added Google & Google Workspace to OpenId examples (#1319)
## [0.20.1] - 2022-11-11
### Bug Fixes
@ -1159,7 +1696,7 @@ All releases can be found on https://code.vikunja.io/api/releases.
* Add option to disable totp for everyone
* Add plausible to docs
* Add restarting commands to all example docker compose files
* Add seperate docker pipeline for amd64 and arm
* Add separate docker pipeline for amd64 and arm
* Add test mail command (#571)
* Add todoist migrator to available migrators in info endpoint if it is enabled
* Add unsplash image proxy for images and thumbnails
@ -1352,7 +1889,7 @@ All releases can be found on https://code.vikunja.io/api/releases.
* Update Renovate Configuration (#161)
* Update src.techknowlogick.com/xgo commit hash to bb0faa3 (#279)
* Update src.techknowlogick.com/xgo commit hash to c43d4c4 (#224)
* Update xorm redis cacher to use the xorm logger instead of a special seperate one
* Update xorm redis cacher to use the xorm logger instead of a special separate one
* Update xorm to v1 (#323)
## [0.12] - 2020-04-04
@ -1493,7 +2030,7 @@ All releases can be found on https://code.vikunja.io/api/releases.
### Added
* Better Caldav support (#73)
* Better CalDAV support (#73)
* Added settings for max open/idle connections and max connection lifetime (#74)
* /info endpoint (#85)
* Added http endpoint to list all users on a list (#87)
@ -1638,4 +2175,3 @@ Misc bugfixes and improvements to the build process
## [0.2] - 2018-10-17
## [0.1] - 2018-09-20

View File

@ -1,49 +1,43 @@
# syntax=docker/dockerfile:1
# ┬─┐┬ ┐o┬ ┬─┐
# │─││ │││ │ │
# ┘─┘┘─┘┘┘─┘┘─┘
##############
# Build stage
FROM golang:1.19-alpine AS build-env
FROM --platform=$BUILDPLATFORM techknowlogick/xgo:go-1.20.x AS builder
RUN apk --no-cache add build-base git && \
go install github.com/magefile/mage@latest && \
mv /go/bin/mage /usr/local/go/bin
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
COPY . ./
# Checkout version if set
RUN if [ -n "${VIKUNJA_VERSION}" ]; then git checkout "${VIKUNJA_VERSION}"; fi \
&& mage build:clean build
ARG TARGETOS TARGETARCH TARGETVARIANT
RUN export PATH=$PATH:$GOPATH/bin && \
mage build:clean && \
mage release:xgo "${TARGETOS}/${TARGETARCH}/${TARGETVARIANT}"
# ┬─┐┬ ┐┌┐┐┌┐┐┬─┐┬─┐
# │┬┘│ │││││││├─ │┬┘
# ┘└┘┘─┘┘└┘┘└┘┴─┘┘└┘
###################
# 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.16
FROM alpine:3.18 AS runner
LABEL maintainer="maintainers@vikunja.io"
WORKDIR /app/vikunja
ENTRYPOINT [ "/sbin/tini", "-g", "--", "/entrypoint.sh" ]
EXPOSE 3456
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 apk --no-cache add shadow && \
addgroup -g ${PGID} vikunja && \
adduser -s /bin/sh -D -G vikunja -u ${PUID} vikunja -h /app/vikunja -H && \
chown vikunja -R /app/vikunja
COPY run.sh /run.sh
# Add time zone data
RUN apk --no-cache add tzdata
RUN apk --update --no-cache add tzdata tini shadow && \
addgroup vikunja && \
adduser -s /bin/sh -D -G vikunja vikunja -h /app/vikunja -H
COPY docker/entrypoint.sh /entrypoint.sh
RUN chmod 0755 /entrypoint.sh && mkdir files
# Files permissions
RUN mkdir /app/vikunja/files && \
chown -R vikunja /app/vikunja/files
VOLUME /app/vikunja/files
CMD ["/run.sh"]
EXPOSE 3456
COPY --from=builder /build/vikunja-* vikunja

View File

@ -1,48 +0,0 @@
##############
# Build stage
FROM golang:1.19-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

View File

@ -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.20.1-brightgreen.svg)](https://dl.vikunja.io)
[![Download](https://img.shields.io/badge/download-v0.21.0-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)
@ -26,13 +26,7 @@ If you find any security-related issues you don't want to disclose publicly, ple
## Features
* Create TODO lists with tasks
* Reminder for tasks
* Namespaces: A "group" which bundles multiple lists
* Share lists and namespaces with teams and users with granular permissions
* Plenty of details for tasks
See [the features page](https://vikunja.io/en/features/) on our website for a more exaustive list or
See [the features page](https://vikunja.io/features/) on our website for a more exaustive list or
try it on [try.vikunja.io](https://try.vikunja.io)!
## Docs
@ -56,10 +50,6 @@ See [the roadmap](https://my.vikunja.cloud/share/QFyzYEmEYfSyQfTOmIRSwLUpkFjboaB
Fork -> Push -> Pull-Request. Also see the [dev docs](https://vikunja.io/docs/development/) for more info.
## Sponsors
[![Relm](https://vikunja.io/images/sponsors/relm.png)](https://relm.us)
## License
This project is licensed under the AGPLv3 License. See the [LICENSE](LICENSE) file for the full license text.
This project is licensed under the AGPLv3 License. See the [LICENSE](LICENSE) file for the full license text.

View File

@ -1,5 +1,5 @@
Vikunja is a to-do list application to facilitate your life.
Copyright 2018-2021 Vikunja and contributors. All rights reserved.
Copyright 2018-present 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

View File

@ -3,7 +3,7 @@ service:
# Default is a random token which will be generated at each startup of vikunja.
# (This means all already issued tokens will be invalid once you restart vikunja)
JWTSecret: "<jwt-secret>"
# The duration of the issed JWT tokens in seconds.
# The duration of the issued JWT tokens in seconds.
# The default is 259200 seconds (3 Days).
jwtttl: 259200
# The duration of the "remember me" time in seconds. When the login request is made with
@ -30,7 +30,7 @@ service:
enablecaldav: true
# Set the motd message, available from the /info endpoint
motd: ""
# Enable sharing of lists via a link
# Enable sharing of project via a link
enablelinksharing: true
# Whether to let new users registering themselves or not
enableregistration: true
@ -46,7 +46,7 @@ service:
sentrydsn: ''
# If not empty, this will enable `/test/{table}` endpoints which allow to put any content in the database.
# Used to reset the db before frontend tests. Because this is quite a dangerous feature allowing for lots of harm,
# each request made to this endpoint neefs to provide an `Authorization: <token>` header with the token from below. <br/>
# each request made to this endpoint needs to provide an `Authorization: <token>` header with the token from below. <br/>
# **You should never use this unless you know exactly what you're doing**
testingtoken: ''
# If enabled, vikunja will send an email to everyone who is either assigned to a task or created it when a task reminder
@ -77,7 +77,7 @@ database:
maxopenconnections: 100
# Sets the maximum number of idle connections to the db.
maxidleconnections: 50
# The maximum lifetime of a single db connection in miliseconds.
# The maximum lifetime of a single db connection in milliseconds.
maxconnectionlifetime: 10000
# Secure connection mode. Only used with postgres.
# (see https://pkg.go.dev/github.com/lib/pq?tab=doc#hdr-Connection_String_Parameters)
@ -91,29 +91,31 @@ database:
# Enable SSL/TLS for mysql connections. Options: false, true, skip-verify, preferred
tls: false
cache:
# If cache is enabled or not
typesense:
# Whether to enable the Typesense integration. If true, all tasks will be synced to the configured Typesense
# instance and all search and filtering will run through Typesense instead of only through the database.
# Typesense allows fast fulltext search including fuzzy matching support. It may return different results than
# what you'd get with a database-only search.
enabled: false
# Cache type. Possible values are "keyvalue", "memory" or "redis".
# When choosing "keyvalue" this setting follows the one configured in the "keyvalue" section.
# When choosing "redis" you will need to configure the redis connection seperately.
type: keyvalue
# When using memory this defines the maximum size an element can take
maxelementsize: 1000
# The url to the Typesense instance you want to use. Can be hosted locally or in Typesense Cloud as long
# as Vikunja is able to reach it.
url: ''
# The Typesense API key you want to use.
apikey: ''
redis:
# Whether to enable redis or not
enabled: false
# The host of the redis server including its port.
host: 'localhost:6379'
# The password used to authenicate against the redis server
# The password used to authenticate against the redis server
password: ''
# 0 means default database
db: 0
cors:
# Whether to enable or disable cors headers.
# Note: If you want to put the frontend and the api on seperate domains or ports, you will need to enable this.
# Note: If you want to put the frontend and the api on separate domains or ports, you will need to enable this.
# Otherwise the frontend won't be able to make requests to the api through the browser.
enable: true
# A list of origins which may access the api. These need to include the protocol (`http://` or `https://`) and port, if any.
@ -165,9 +167,13 @@ log:
# Echo has its own logging which usually is unnecessary, which is why it is disabled by default. Possible values are stdout, stderr, file or off to disable standard logging.
echo: "off"
# Whether or not to log events. Useful for debugging. Possible values are stdout, stderr, file or off to disable events logging.
events: "stdout"
events: "off"
# The log level for event log messages. Possible values (case-insensitive) are ERROR, INFO, DEBUG.
eventslevel: "info"
# Whether or not to log mail log messages. This will not log mail contents. Possible values are stdout, stderr, file or off to disable mail-related logging.
mail: "off"
# The log level for mail log messages. Possible values (case-insensitive) are ERROR, WARNING, INFO, DEBUG.
maillevel: "info"
ratelimit:
# whether or not to enable the rate limit
@ -191,21 +197,6 @@ files:
maxsize: 20MB
migration:
# These are the settings for the wunderlist migrator
wunderlist:
# Wheter to enable the wunderlist migrator or not
enable: false
# The client id, required for making requests to the wunderlist api
# You need to register your vikunja instance at https://developer.wunderlist.com/apps/new to get this
clientid:
# The client secret, also required for making requests to the wunderlist api
clientsecret:
# The url where clients are redirected after they authorized Vikunja to access their wunderlist stuff.
# This needs to match the url you entered when registering your Vikunja instance at wunderlist.
# This is usually the frontend url where the frontend then makes a request to /migration/wunderlist/migrate
# with the code obtained from the wunderlist api.
# Note that the vikunja frontend expects this to be /migrate/wunderlist
redirecturl:
todoist:
# Wheter to enable the todoist migrator or not
enable: false
@ -221,7 +212,7 @@ migration:
# Note that the vikunja frontend expects this to be /migrate/todoist
redirecturl: <frontend url>/migrate/todoist
trello:
# Wheter to enable the trello migrator or not
# Whether to enable the trello migrator or not
enable: false
# The client id, required for making requests to the trello api
# You need to register your vikunja instance at https://trello.com/app-key (log in before you visit that link) to get this
@ -237,7 +228,7 @@ migration:
enable: false
# The client id, required for making requests to the microsoft graph api
# See https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app#register-an-application
# for information about how to register your vikuinja instance.
# for information about how to register your Vikunja instance.
clientid:
# The client secret, also required for making requests to the microsoft graph api
clientsecret:
@ -253,14 +244,14 @@ avatar:
gravatarexpiration: 3600
backgrounds:
# Whether to enable backgrounds for lists at all.
# Whether to enable backgrounds for projects at all.
enabled: true
providers:
upload:
# Whethere to enable uploaded list backgrounds
# Whether to enable uploaded project backgrounds
enabled: true
unsplash:
# Whether to enable setting backgrounds from unsplash as list backgrounds
# Whether to enable setting backgrounds from unsplash as project backgrounds
enabled: false
# You need to create an application for your installation at https://unsplash.com/oauth/applications/new
# and set the access token below.
@ -280,7 +271,7 @@ legal:
# Key Value Storage settings
# The Key Value Storage is used for different kinds of things like metrics and a few cache systems.
keyvalue:
# The type of the storage backend. Can be either "memory" or "redis". If "redis" is chosen it needs to be configured seperately.
# The type of the storage backend. Can be either "memory" or "redis". If "redis" is chosen it needs to be configured separately.
type: "memory"
auth:
@ -295,7 +286,7 @@ auth:
# If the email is not public in those cases, authenticating will fail.
# **Note 2:** The frontend expects to be redirected after authentication by the third party
# to <frontend-url>/auth/openid/<auth key>. Please make sure to configure the redirect url with your third party
# auth service accordingy if you're using the default vikunja frontend.
# auth service accordingly if you're using the default vikunja frontend.
# Take a look at the [default config file](https://kolaente.dev/vikunja/api/src/branch/main/config.yml.sample) for more information about how to configure openid authentication.
openid:
# Enable or disable OpenID Connect authentication
@ -311,6 +302,9 @@ auth:
- name:
# The auth url to send users to if they want to authenticate using OpenID Connect.
authurl:
# The oidc logouturl that users will be redirected to on logout.
# Leave empty or delete key, if you do not want to be redirected.
logouturl:
# The client ID used to authenticate Vikunja at the OpenID Connect provider.
clientid:
# The client secret used to authenticate Vikunja at the OpenID Connect provider.
@ -318,7 +312,7 @@ auth:
# Prometheus metrics endpoint
metrics:
# If set to true, enables a /metrics endpoint for prometheus to collect metrics about Vikunja.
# If set to true, enables a /metrics endpoint for prometheus to collect metrics about Vikunja. You can query it from `/api/v1/metrics`.
enabled: false
# If set to a non-empty value the /metrics endpoint will require this as a username via basic auth in combination with the password below.
username:
@ -341,8 +335,8 @@ defaultsettings:
overdue_tasks_reminders_enabled: true
# When to send the overdue task reminder email.
overdue_tasks_reminders_time: 9:00
# The id of the default list. Make sure users actually have access to this list when setting this value.
default_list_id: 0
# The id of the default project. Make sure users actually have access to this project when setting this value.
default_project_id: 0
# Start of the week for the user. `0` is sunday, `1` is monday and so on.
week_start: 0
# The language of the user interface. Must be an ISO 639-1 language code. Will default to the browser language the user uses when signing up.

View File

@ -1,17 +0,0 @@
image: vikunja/api:unstable
manifests:
-
image: vikunja/api:unstable-linux-amd64
platform:
architecture: amd64
os: linux
-
image: vikunja/api:unstable-linux-arm64
platform:
architecture: arm64
os: linux
-
image: vikunja/api:unstable-linux-arm
platform:
architecture: arm
os: linux

View File

@ -1,23 +0,0 @@
image: vikunja/api:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
-
image: vikunja/api:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform:
architecture: amd64
os: linux
-
image: vikunja/api:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform:
architecture: arm64
os: linux
-
image: vikunja/api:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform:
architecture: arm
os: linux

15
docker/entrypoint.sh Normal file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env sh
set -e
if [ -n "$PUID" ] && [ "$PUID" -ne 0 ] && \
[ -n "$PGID" ] && [ "$PGID" -ne 0 ] ; then
echo "info: creating the new user vikunja with $PUID:$PGID"
groupmod -g "$PGID" -o vikunja
usermod -u "$PUID" -o vikunja
chown -R vikunja:vikunja ./files/
chown vikunja:vikunja .
exec su vikunja -c /app/vikunja/vikunja "$@"
else
echo "info: creation of non-root user is skipped"
exec /app/vikunja/vikunja "$@"
fi

View File

@ -28,7 +28,7 @@ markup:
menu:
page:
- name: Home
url: https://vikunja.io/en/
url: https://vikunja.io/
weight: 10
- name: Features
url: https://vikunja.io/features
@ -36,6 +36,9 @@ menu:
- name: Download
url: https://vikunja.io/download
weight: 30
- name: Blog
url: https://vikunja.io/blog/
weight: 35
- name: Docs
url: https://vikunja.io/docs
weight: 40
@ -45,6 +48,16 @@ menu:
- name: Community
url: https://community.vikunja.io/
weight: 60
- name: Stickers
url: https://vikunja.cloud/stickers?utm_source=io&utm_medium=io&utm_campaign=menu
weight: 65
- name: Get it Hosted
url: https://vikunja.cloud/?utm_source=io&utm_medium=io&utm_campaign=menu
weight: 70
sidebar:
- name: setup
weight: 10
- name: usage
weight: 20
- name: development
weight: 30

View File

@ -22,4 +22,4 @@ and [available configuration options]({{< ref "./setup/config.md">}}).
## Developing
If you want to start contributing to Vikunja, take a look at [the development docs]({{< ref "./development/development.md">}}).
If you want to start contributing to Vikunja, take a look at [the development docs]({{< ref "./development/development.md">}}).

View File

@ -12,10 +12,10 @@ menu:
All cli-related functions are located in `pkg/cmd`.
Each cli command usually calls a function in another package.
For example, the `vikunja migrate` command calls `migration.Migrate()`.
For example, the `vikunja migrate` command calls `migration.Migrate()`.
Vikunja uses the amazing [cobra](https://github.com/spf13/cobra) library for its cli.
Please refer to its documentation for informations about how to use flags etc.
Please refer to its documentation for information about how to use flags etc.
To add a new cli command, add something like the following:

View File

@ -29,7 +29,7 @@ Then run `mage generate-docs` to generate the configuration docs from the sample
## Getting Configuration Values
To retreive a configured value call the key with a getter for the type you need.
To retrieve a configured value call the key with a getter for the type you need.
For example:
{{< highlight golang >}}

View File

@ -12,9 +12,7 @@ menu:
Cron jobs are tasks which run on a predefined schedule.
Vikunja uses these through a light wrapper package around the excellent [github.com/robfig/cron](https://github.com/robfig/cron) package.
The package exposes a `cron.Schedule` method with two arguments: The first one to define the schedule when the cron task
should run, and the second one with the actual function to run at the schedule.
You would then create a new function to register your the actual cron task in your package.
The package exposes a `cron.Schedule` method with two arguments: The first one to define the schedule when the cron task should run, and the second one with the actual function to run at the schedule. You would then create a new function to register your the actual cron task in your package.
A basic function to register a cron task looks like this:

View File

@ -26,8 +26,7 @@ To add a new table to the database, create the struct and [add a migration for i
To learn more about how to configure your struct to create "good" tables, refer to [the xorm documentaion](https://xorm.io/docs/).
In most cases you will also need to implement the `TableName() string` method on the new struct to make sure the table
name matches the rest of the tables - plural.
In most cases you will also need to implement the `TableName() string` method on the new struct to make sure the table name matches the rest of the tables - plural.
## Adding data to test fixtures
@ -36,5 +35,4 @@ Adding data for test fixtures can be done via `yaml` files in `pkg/models/fixtur
The name of the yaml file should match the table name in the database.
Adding values to it is done via array definition inside it.
**Note**: Table and column names need to be in snake_case as that's what is used internally in the database
and for mapping values from the database to xorm so your structs can use it.
**Note**: Table and column names need to be in snake_case as that's what is used internally in the database and for mapping values from the database to xorm so your structs can use it.

View File

@ -25,7 +25,7 @@ All migrations are stored in `pkg/migrations` and files should have the same nam
Each migration should have a function to apply and roll it back, as well as a numeric id (the datetime)
and a more in-depth description of what the migration actually does.
To easily get a new id, run the following on any unix system:
To easily get a new id, run the following on any unix system:
{{< highlight bash >}}
date +%Y%m%d%H%M%S
@ -75,4 +75,4 @@ func init() {
}
{{< /highlight >}}
You should always copy the changed parts of the struct you're changing when adding migraitons.
You should always copy the changed parts of the struct you're changing when adding migrations.

View File

@ -48,7 +48,7 @@ A release gets tagged from the main branch with the version name as tag name.
Backports and point-releases should go to a `release/version` branch, based on the tag they are building on top of.
## Conventional commits
## Conventional Commits
We're using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) because they greatly simplify generating release notes.

View File

@ -13,14 +13,14 @@ menu:
All custom errors are defined in `pkg/models/errors.go`.
You should add new ones in this file.
Custom errors usually have fields for the http return code, a [vikunja-specific error code]({{< ref "../usage/errors.md">}})
Custom errors usually have fields for the http return code, a [Vikunja-specific error code]({{< ref "../usage/errors.md">}})
and a human-readable error message about what went wrong.
An error consists of multiple functions and definitions:
{{< highlight golang >}}
// This struct holds any information about this specific error.
// In this case, it contains the user ID of a nonexistand user.
// In this case, it contains the user ID of a nonexistent user.
// This type should always be a struct, even if it has no values in it.
// ErrUserDoesNotExist represents a "UserDoesNotExist" kind of error.
@ -44,21 +44,21 @@ func (err ErrUserDoesNotExist) Error() string {
return fmt.Sprintf("User does not exist [user id: %d]", err.UserID)
}
// This const holds the vikunja error code used to be able to identify this error without having to
// This const holds the Vikunja error code used to be able to identify this error without having to
// rely on an error string.
// This needs to be unique, so you should check whether the error code exists or not.
// The general convention for error codes is as follows:
// * Every "group" errors lives in a thousend something. For example all user issues are 1000-something, all
// list errors are 3000-something and so on.
// project errors are 3000-something and so on.
// * New error codes should be the current max error code + 1. Don't take free numbers to prevent old errors
// which are depricated and removed from being "new ones". For example, if there are error codes 1001, 1002, 1004,
// which are deprecated and removed from being "new ones". For example, if there are error codes 1001, 1002, 1004,
// a new error should be 1005 and not 1003.
// ErrCodeUserDoesNotExist holds the unique world-error code of this error
const ErrCodeUserDoesNotExist = 1005
// This is the implementation which returns an http error which is then passed to the client.
// Here you define the http status code with which one the error will be returned, the vikunja error code and
// Here you define the http status code with which one the error will be returned, the Vikunja error code and
// a human-readable error message.
// HTTPError holds the http error description

View File

@ -42,7 +42,7 @@ You then get the event with all its data back in the listener, see below.
#### Naming Convention
Event names should roughly have the entity they're dealing with on the left and the action on the right of the name, separated by `.`.
There's no limit to how "deep" or specifig an event name can be.
There's no limit to how "deep" or specific an event name can be.
The name should have the most general concept it's describing at the left, getting more specific on the right of it.
@ -104,7 +104,7 @@ func createTask(s *xorm.Session, t *Task, a web.Auth, updateAssignees bool) (err
}
{{< /highlight >}}
As you can see, the curent task and doer are injected into it.
As you can see, the current task and doer are injected into it.
### Special Events
@ -133,7 +133,7 @@ type Listener interface {
The `Handle` method is executed when the event this listener listens on is dispatched.
* As the single parameter, it gets the payload of the event, which is the event struct when it was dispatched decoded as json object and passed as a slice of bytes.
To use it you'll need to unmarshal it. Unfortunately there's no way to pass an already populated event object to the function because we would not know what type it has when parsing it.
* If the handler returns an error, the listener is retried 5 times, with an exponentional back-off period in between retries.
* If the handler returns an error, the listener is retried 5 times, with an exponential back-off period in between retries.
If it still fails after the fifth retry, the event is nack'd and it's up to the event dispatcher to resend it.
You can learn more about this mechanism in the [watermill documentation](https://watermill.io/docs/middlewares/#retry).
@ -148,7 +148,7 @@ The easiest way to create a new listener for an event is with mage:
mage dev:make-listener <listener-name> <event-name> <package>
```
This will create a new listener type in the `pkg/<package>/listners.go` file and implement the `Handle` and `Name` methods.
This will create a new listener type in the `pkg/<package>/listeners.go` file and implement the `Handle` and `Name` methods.
It will also pre-generate some boilerplate code to unmarshal the event from the payload.
Furthermore, it will register the listener for its event in the `RegisterListeners()` method of the same file.
@ -157,7 +157,7 @@ This function is called at startup and has to contain all events you want to lis
### Listening for Events
To listen for an event, you need to register the listener for the event it should be called for.
This usually happens in the `RegisterListeners()` method in `pkg/<package>/listners.go` which is called at start up.
This usually happens in the `RegisterListeners()` method in `pkg/<package>/listeners.go` which is called at start up.
The listener will never be executed if it hasn't been registered.
@ -179,7 +179,7 @@ func (s *IncreaseTaskCounter) Name() string {
return "task.counter.increase"
}
// Hanlde is executed when the event IncreaseTaskCounter listens on is fired
// Handle is executed when the event IncreaseTaskCounter listens on is fired
func (s *IncreaseTaskCounter) Handle(payload message.Payload) (err error) {
return keyvalue.IncrBy(metrics.TaskCountKey, 1)
}

View File

@ -26,8 +26,8 @@ It returns the `limit` (max-length) and `offset` parameters needed for SQL-Queri
You can feed this function directly into xorm's `Limit`-Function like so:
{{< highlight golang >}}
lists := []List{}
err := x.Limit(getLimitFromPageIndex(pageIndex, itemsPerPage)).Find(&lists)
projects := []*Project{}
err := x.Limit(getLimitFromPageIndex(pageIndex, itemsPerPage)).Find(&projects)
{{< /highlight >}}
// TODO: Add a full example from start to finish, like a tutorial on how to create a new endpoint?

View File

@ -31,7 +31,7 @@ go install github.com/magefile/mage
There are multiple categories of subcommands in the magefile:
* `build`: Contains commands to build a single binary
* `check`: Contains commands to statically check the source code
* `check`: Contains commands to statically check the source code
* `release`: Contains commands to release Vikunja with everything that's required
* `test`: Contains commands to run all kinds of tests
* `dev`: Contains commands to run development tasks
@ -114,7 +114,7 @@ binary to be able to use it.
* `mage release:check` creates sha256 checksums for each binary which will be included in the zip file
* `mage release:os-package` bundles a binary with the `sha256` checksum file, a sample `config.yml` and a copy of the license in a folder for each architecture
* `mage release:compress` compresses all build binaries with `upx` to save space
* `mage release:zip` paclages a zip file for the files created by `release:os-package`
* `mage release:zip` packages a zip file for the files created by `release:os-package`
### Build os packages
@ -168,7 +168,7 @@ Runs all integration tests.
mage dev:create-migration
{{< /highlight >}}
Creates a new migration with the current date.
Creates a new migration with the current date.
Will ask for the name of the struct you want to create a migration for.
See also [migration docs]({{< ref "mage.md" >}}).

View File

@ -34,14 +34,13 @@ promauto.NewGaugeFunc(prometheus.GaugeOpts{
})
{{< /highlight >}}
Then you'll need to set the metrics initial value on every startup of vikunja.
Then you'll need to set the metrics initial value on every startup of Vikunja.
This is done in `pkg/routes/routes.go` to avoid cyclic imports.
If metrics are enabled, it checks if a redis connection is available and then sets the initial values.
A convenience function is available if the metric is based on a database struct.
Because metrics are stored in redis, you are responsible to increase or decrease these based on criteria you define.
To do this, use `metrics.UpdateCount(value, key)` where `value` is the amount you want to cange it (you can pass
negative values to decrease it) and `key` it the redis key used to define the metric.
To do this, use `metrics.UpdateCount(value, key)` where `value` is the amount you want to change it (you can pass negative values to decrease it) and `key` it the redis key used to define the metric.
## Using it

View File

@ -17,12 +17,9 @@ In general, each migrator implements a migrator interface which is then called f
The interface makes it possible to use helper methods which handle http and focus only on the implementation of the migrator itself.
There are two ways of migrating data from another service:
1. Through the auth-based flow where the user gives you access to their data at the third-party service through an
oauth flow. You can then call the service's api on behalf of your user to get all the data.
The Todoist, Trello and Microsoft To-Do Migrators use this pattern.
2. A file migration where the user uploads a file obtained from some third-party service. In your migrator, you need
to parse the file and create the lists, tasks etc.
The Vikunja File Import uses this pattern.
1. Through the auth-based flow where the user gives you access to their data at the third-party service through an oauth flow. You can then call the service's api on behalf of your user to get all the data. The Todoist, Trello and Microsoft To-Do Migrators use this pattern.
2. A file migration where the user uploads a file obtained from some third-party service. In your migrator, you need to parse the file and create the projects, tasks etc. The Vikunja File Import uses this pattern.
To differentiate the two, there are two different interfaces you must implement.
@ -43,7 +40,7 @@ type Migrator interface {
// Name holds the name of the migration.
// This is used to show the name to users and to keep track of users who already migrated.
Name() string
// Migrate is the interface used to migrate a user's tasks from another platform to vikunja.
// Migrate is the interface used to migrate a user's tasks from another platform to Vikunja.
// The user object is the user who's tasks will be migrated.
Migrate(user *models.User) error
// AuthURL returns a url for clients to authenticate against.
@ -61,7 +58,7 @@ type FileMigrator interface {
// Name holds the name of the migration.
// This is used to show the name to users and to keep track of users who already migrated.
Name() string
// Migrate is the interface used to migrate a user's tasks, list and other things from a file to vikunja.
// Migrate is the interface used to migrate a user's tasks, projects and other things from a file to Vikunja.
// The user object is the user who's tasks will be migrated.
Migrate(user *user.User, file io.ReaderAt, size int64) error
}
@ -102,35 +99,33 @@ You should also document the routes with [swagger annotations]({{< ref "swagger-
## Insertion helper method
There is a method available in the `migration` package which takes a fully nested Vikunja structure and creates it with all relations.
This means you start by adding a namespace, then add lists inside of that namespace, then tasks in the lists and so on.
There is a method available in the `migration` package which takes a fully nested Vikunja structure and creates it with all relations.
This means you start by adding a project, then add projects inside that project, then tasks in the lists and so on.
In general, it is reccommended to have one root project with all projects of the other service as child projects.
The root structure must be present as `[]*models.NamespaceWithListsAndTasks`. It allows to represent all of Vikunja's
hierachie as a single data structure.
The root structure must be present as `[]*models.ProjectWithTasksAndBuckets`. It allows to represent all of Vikunja's hierarchy as a single data structure.
Then call the method like so:
```go
fullVikunjaHierachie, err := convertWunderlistToVikunja(wContent)
fullVikunjaHierarchy, err := convertWunderlistToVikunja(wContent)
if err != nil {
return
}
err = migration.InsertFromStructure(fullVikunjaHierachie, user)
err = migration.InsertFromStructure(fullVikunjaHierarchy, user)
```
## Configuration
If your migrator is an oauth-based one, you should add at least an option to enable or disable it.
Chances are, you'll need some more options for things like client ID and secret
(if the other service uses oAuth as an authentication flow).
Chances are, you'll need some more options for things like client ID and secret (if the other service uses oAuth as an authentication flow).
The easiest way to implement an on/off switch is to check whether your migration service is enabled or not when
registering the routes, and then simply don't registering the routes in case it is disabled.
The easiest way to implement an on/off switch is to check whether your migration service is enabled or not when registering the routes, and then simply don't registering the routes in case it is disabled.
File based migrators can always be enabled.
### Making the migrator public in `/info`
### Making the migrator public in `/info`
You should make your migrator available in the `/info` endpoint so that frontends can display options to enable them or not.
To do this, add an entry to the `AvailableMigrators` field in `pkg/routes/api/v1/info.go`.

View File

@ -10,7 +10,7 @@ menu:
# Notifications
Vikunjs provides a simple abstraction to send notifications per mail and in the database.
Vikunja provides a simple abstraction to send notifications per mail and in the database.
{{< table_of_contents >}}
@ -39,7 +39,7 @@ A list of chainable functions is available to compose a mail:
mail := NewMail().
// The optional sender of the mail message.
From("test@example.com").
// The optional receipient of the mail message. Uses the mail address of the notifiable if omitted.
// The optional recipient of the mail message. Uses the mail address of the notifiable if omitted.
To("test@otherdomain.com").
// The subject of the mail to send.
Subject("Testmail").
@ -49,7 +49,7 @@ mail := NewMail().
Line("This is a line of text").
// An action can contain a title and a url. It gets rendered as a big button in the mail.
// Note that you can have only one action per mail.
// All lines added before an action will appearr in the mail before the button, all lines
// All lines added before an action will appear in the mail before the button, all lines
// added afterwards will appear after it.
Action("The Action", "https://example.com").
// Another line of text.
@ -60,8 +60,7 @@ If not provided, the `from` field of the mail contains the value configured in [
### Database notifications
All data returned from the `ToDB()` method is serialized to json and saved into the database, along with the id of the
notifiable, the name of the notification and a time stamp.
All data returned from the `ToDB()` method is serialized to json and saved into the database, along with the id of the notifiable, the name of the notification and a time stamp.
If you don't use the database notification, the `Name()` function can return an empty string.
## Creating a new notification

View File

@ -12,10 +12,10 @@ menu:
This checklist is a collection of all steps usually involved when releasing a new version of Vikunja.
Not all steps are necessary for every release.
* Website update :
* Website update
* New Features: If there are new features worth mentioning the feature page should be updated.
* New Screenshots: If an overhaul of an existing feature happend so that it now looks different from the existing screenshot, a new one is required.
* Generate changelogs: (with git-cliff)
* New Screenshots: If an overhaul of an existing feature happened so that it now looks different from the existing screenshot, a new one is required.
* Generate changelogs (with git-cliff)
* Frontend
* API
* Desktop
@ -23,11 +23,11 @@ Not all steps are necessary for every release.
* Frontend
* API
* Desktop
* Once built: Prune the cloudflare cache so that the new versions show up at dl.vikunja.io
* Release Highlights Blogpost:
* Once built: Prune the cloudflare cache so that the new versions show up at [dl.vikunja.io](https://dl.vikunja.io/)
* Release Highlights Blogpost
* Include a section about Vikunja in general (totally fine to copy one from the earlier blog posts)
* New Features & Improvements: Mention bigger features, potentially with screenshots. Things like refactoring are sometimes also worth mentioneing.
* Publish:
* New Features & Improvements: Mention bigger features, potentially with screenshots. Things like refactoring are sometimes also worth mentioning.
* Publish
* Reddit
* Twitter
* Mastodon
@ -36,4 +36,3 @@ Not all steps are necessary for every release.
* Forum
* If features in the release were sponsored, send an email to relevant stakeholders
* Update Vikunja Cloud version and other instances

View File

@ -64,7 +64,7 @@ See [integration tests]({{< ref "test.md" >}}#integration-tests) for more detail
### log
Similar to `config`, this will set up the logging, based on differen logging backends.
Similar to `config`, this will set up the logging, based on different logging backends.
This init is called in `main.go` after the config init is done.
### mail
@ -108,7 +108,7 @@ Contains all possible avatar providers a user can choose to set their avatar.
#### background
All list background providers are in sub-packages of this package.
All project background providers are in sub-packages of this package.
#### dump
@ -126,7 +126,7 @@ See [writing a migrator]({{< ref "migration.md" >}}).
### red (redis)
This package initializes a connection to a redis server.
This inizialization is automatically done at the startup of vikunja.
This initialization is automatically done at the startup of Vikunja.
It also has a function (`GetRedis()`) which returns a redis client object you can then use in your package
to talk to redis.
@ -138,7 +138,7 @@ In most cases, using the `keyvalue` package is a better fit.
### routes
This package defines all routes which are available for vikunja clients to use.
This package defines all routes which are available for Vikunja clients to use.
To add a new route, see [adding a new route]({{< ref "feature.md">}}).
#### api/v1
@ -148,7 +148,7 @@ Every handler function which does not use the standard web handler should live h
### swagger
This is where the [generated]({{< ref "mage.md#generate-swagger-definitions-from-code-comments">}} [api docs]({{< ref "../usage/api.md">}}) live.
This is where the [generated]({{< ref "mage.md#generate-swagger-definitions-from-code-comments">}}) [api docs]({{< ref "../usage/api.md">}}) live.
You usually don't need to touch this package.
### user
@ -162,10 +162,9 @@ A small package, containing some helper functions:
* `MakeRandomString`: Generates a random string of a given length.
* `Sha256`: Calculates a sha256 hash from a given string.
See their function definitions for instructions on how to use them.
See their function definitions for instructions on how to use them.
### version
The single purpouse of this package is to hold the current vikunja version which gets overridden through build flags
each time `mage release` or `mage build` is run.
It is a seperate package to avoid import cycles with other packages.
The single purpose of this package is to hold the current Vikunja version which gets overridden through build flags each time `mage release` or `mage build` is run.
It is a separate package to avoid import cycles with other packages.

View File

@ -19,29 +19,52 @@ The api documentation is generated using [swaggo](https://github.com/swaggo/swag
You should always comment every field which will be exposed as a json in the api.
These comments will show up in the documentation, it'll make it easier for developers using the api.
As an example, this is the definition of a list with all comments:
As an example, this is the definition of a project with all comments:
{{< highlight golang >}}
// List represents a list of tasks
type List struct {
// The unique, numeric id of this list.
ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"list"`
// The title of the list. You'll see this in the namespace overview.
Title string `xorm:"varchar(250)" json:"title" valid:"required,runelength(3|250)" minLength:"3" maxLength:"250"`
// The description of the list.
Description string `xorm:"varchar(1000)" json:"description" valid:"runelength(0|1000)" maxLength:"1000"`
OwnerID int64 `xorm:"bigint INDEX" json:"-"`
NamespaceID int64 `xorm:"bigint INDEX" json:"-" param:"namespace"`
type Project struct {
// The unique, numeric id of this project.
ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"project"`
// The title of the project. You'll see this in the overview.
Title string `xorm:"varchar(250) not null" json:"title" valid:"required,runelength(1|250)" minLength:"1" maxLength:"250"`
// The description of the project.
Description string `xorm:"longtext null" json:"description"`
// The unique project short identifier. Used to build task identifiers.
Identifier string `xorm:"varchar(10) null" json:"identifier" valid:"runelength(0|10)" minLength:"0" maxLength:"10"`
// The hex color of this project
HexColor string `xorm:"varchar(6) null" json:"hex_color" valid:"runelength(0|6)" maxLength:"6"`
// The user who created this list.
Owner User `xorm:"-" json:"owner" valid:"-"`
// An array of tasks which belong to the list.
Tasks []*ListTask `xorm:"-" json:"tasks"`
OwnerID int64 `xorm:"bigint INDEX not null" json:"-"`
ParentProjectID int64 `xorm:"bigint INDEX null" json:"parent_project_id"`
ParentProject *Project `xorm:"-" json:"-"`
// A unix timestamp when this list was created. You cannot change this value.
Created int64 `xorm:"created" json:"created"`
// A unix timestamp when this list was last updated. You cannot change this value.
Updated int64 `xorm:"updated" json:"updated"`
// The user who created this project.
Owner *user.User `xorm:"-" json:"owner" valid:"-"`
// Whether a project is archived.
IsArchived bool `xorm:"not null default false" json:"is_archived" query:"is_archived"`
// The id of the file this project has set as background
BackgroundFileID int64 `xorm:"null" json:"-"`
// Holds extra information about the background set since some background providers require attribution or similar. If not null, the background can be accessed at /projects/{projectID}/background
BackgroundInformation interface{} `xorm:"-" json:"background_information"`
// Contains a very small version of the project background to use as a blurry preview until the actual background is loaded. Check out https://blurha.sh/ to learn how it works.
BackgroundBlurHash string `xorm:"varchar(50) null" json:"background_blur_hash"`
// True if a project is a favorite. Favorite projects show up in a separate parent project. This value depends on the user making the call to the api.
IsFavorite bool `xorm:"-" json:"is_favorite"`
// The subscription status for the user reading this project. You can only read this property, use the subscription endpoints to modify it.
// Will only returned when retrieving one project.
Subscription *Subscription `xorm:"-" json:"subscription,omitempty"`
// The position this project has when querying all projects. See the tasks.position property on how to use this.
Position float64 `xorm:"double null" json:"position"`
// A timestamp when this project was created. You cannot change this value.
Created time.Time `xorm:"created not null" json:"created"`
// A timestamp when this project was last updated. You cannot change this value.
Updated time.Time `xorm:"updated not null" json:"updated"`
web.CRUDable `xorm:"-" json:"-"`
web.Rights `xorm:"-" json:"-"`

View File

@ -46,10 +46,10 @@ To run integration tests, use `mage test:integration`.
### Running tests with config
You can run tests with all available config variables if you want, enabeling you to run tests for a lot of scenarios.
You can run tests with all available config variables if you want, enabling you to run tests for a lot of scenarios.
We use this in CI to run all tests with different databases.
To use the normal config set the enviroment variable `VIKUNJA_TESTS_USE_CONFIG=1`.
To use the normal config set the environment variable `VIKUNJA_TESTS_USE_CONFIG=1`.
### Showing sql queries

View File

@ -67,7 +67,6 @@ Beispiel: „Benutzer:in“
| Englisches Original | Verwendung in deutscher Übersetzung |
| ------------------- | -------------------- |
| Bucket | Spalte |
| Namespace | Namespace |
| Link Share | Linkfreigabe |
| Username | Anmeldename |

View File

@ -21,7 +21,7 @@ Currently, only the frontend (and by extension, the desktop app) is translatable
## Translation Instructions
> These are the instructions for translating Vikunja in another language.
> These are the instructions for translating Vikunja in another language.
> For information about how to add new translation strings, see below.
For all languages these translation guidelines should be applied when translating:
@ -44,7 +44,7 @@ Instead, translate it to reflect the original meaning in the translated string b
All translation strings are stored in `src/i18n/lang/`.
New strings should be added only in the `en.json` file.
Strings in other languages will be synced through weblate and should not be added directly as a PR/commit in the frontend repo.
Strings in other languages will be synced through [crowdin](https://crowdin.com/project/vikunja) and should not be added directly as a PR/commit in the frontend repo.
## Requesting a new language

View File

@ -56,4 +56,4 @@ For more information, please visit the [relevant PostgreSQL documentation](https
### SQLite
To back up sqllite databases, it is enough to copy the [database file]({{< ref "config.md" >}}#path) to somwhere else.
To back up sqllite databases, it is enough to copy the [database file]({{< ref "config.md" >}}#path) to somewhere else.

View File

@ -19,14 +19,10 @@ To completely build Vikunja from source, you need to build the api and frontend.
The Vikunja API has no other dependencies than go itself.
That means compiling it boils down to these steps:
1. Make sure [Go](https://golang.org/doc/install) is properly installed on your system. You'll need at least Go `1.17`.
1. Make sure [Go](https://golang.org/doc/install) is properly installed on your system. You'll need at least Go `1.19`.
2. Make sure [Mage](https://magefile.org) is properly installed on your system.
3. Clone the repo with `git clone https://code.vikunja.io/api` and switch into the directory.
4. Run `mage build:build` in the source of this repo. This will build a binary in the root of the repo which will be able to run on your system.
*Note:* Static ressources such as email templates are built into the binary.
For these to work, you may need to run `mage build:generate` before building the vikunja binary.
When builing entirely with `mage`, you dont need to do this, `mage build:generate` will be run automatically when running `mage build:build`.
4. Run `mage build` in the source of this repo. This will build a binary in the root of the repo which will be able to run on your system.
### Build for different architectures

View File

@ -10,8 +10,7 @@ menu:
# Configuration options
You can either use a `config.yml` file in the root directory of vikunja or set almost all config option with
environment variables. If you have both, the value set in the config file is used.
You can either use a `config.yml` file in the root directory of vikunja or set almost all config option with environment variables. If you have both, the value set in the config file is used.
Right now it is not possible to configure openid authentication via environment variables.
Variables are nested in the `config.yml`, these nested variables become `VIKUNJA_FIRST_CHILD` when configuring via
@ -31,7 +30,7 @@ first:
# Formats
Vikunja supports using `toml`, `yaml`, `hcl`, `ini`, `json`, envfile, env variables and Java Properties files.
We reccomend yaml or toml, but you're free to use whatever you want.
We recommend yaml or toml, but you're free to use whatever you want.
Vikunja provides a default [`config.yml`](https://kolaente.dev/vikunja/api/src/branch/main/config.yml.sample) file which you can use as a starting point.
@ -56,7 +55,7 @@ If you don't provide a value in your config file, their default will be used.
Most config variables are nested under some "higher-level" key.
For example, the `interface` config variable is a child of the `service` key.
The docs below aim to reflect that leveling, but please also have a lookt at [the default config](https://code.vikunja.io/api/src/branch/main/config.yml.sample) file
The docs below aim to reflect that leveling, but please also have a look at [the default config](https://code.vikunja.io/api/src/branch/main/config.yml.sample) file
to better grasp how the nesting looks like.
<!-- Generated config will be injected here -->
@ -82,7 +81,7 @@ Environment path: `VIKUNJA_SERVICE_JWTSECRET`
### jwtttl
The duration of the issed JWT tokens in seconds.
The duration of the issued JWT tokens in seconds.
The default is 259200 seconds (3 Days).
Default: `259200`
@ -208,7 +207,7 @@ Environment path: `VIKUNJA_SERVICE_MOTD`
### enablelinksharing
Enable sharing of lists via a link
Enable sharing of project via a link
Default: `true`
@ -287,7 +286,7 @@ Environment path: `VIKUNJA_SERVICE_SENTRYDSN`
If not empty, this will enable `/test/{table}` endpoints which allow to put any content in the database.
Used to reset the db before frontend tests. Because this is quite a dangerous feature allowing for lots of harm,
each request made to this endpoint neefs to provide an `Authorization: <token>` header with the token from below. <br/>
each request made to this endpoint needs to provide an `Authorization: <token>` header with the token from below. <br/>
**You should never use this unless you know exactly what you're doing**
Default: `<empty>`
@ -430,7 +429,7 @@ Environment path: `VIKUNJA_DATABASE_MAXIDLECONNECTIONS`
### maxconnectionlifetime
The maximum lifetime of a single db connection in miliseconds.
The maximum lifetime of a single db connection in milliseconds.
Default: `10000`
@ -497,43 +496,45 @@ Environment path: `VIKUNJA_DATABASE_TLS`
---
## cache
## typesense
### enabled
If cache is enabled or not
Whether to enable the Typesense integration. If true, all tasks will be synced to the configured Typesense
instance and all search and filtering will run through Typesense instead of only through the database.
Typesense allows fast fulltext search including fuzzy matching support. It may return different results than
what you'd get with a database-only search.
Default: `false`
Full path: `cache.enabled`
Full path: `typesense.enabled`
Environment path: `VIKUNJA_CACHE_ENABLED`
Environment path: `VIKUNJA_TYPESENSE_ENABLED`
### type
### url
Cache type. Possible values are "keyvalue", "memory" or "redis".
When choosing "keyvalue" this setting follows the one configured in the "keyvalue" section.
When choosing "redis" you will need to configure the redis connection seperately.
The url to the Typesense instance you want to use. Can be hosted locally or in Typesense Cloud as long
as Vikunja is able to reach it.
Default: `keyvalue`
Default: `<empty>`
Full path: `cache.type`
Full path: `typesense.url`
Environment path: `VIKUNJA_CACHE_TYPE`
Environment path: `VIKUNJA_TYPESENSE_URL`
### maxelementsize
### apikey
When using memory this defines the maximum size an element can take
The Typesense API key you want to use.
Default: `1000`
Default: `<empty>`
Full path: `cache.maxelementsize`
Full path: `typesense.apikey`
Environment path: `VIKUNJA_CACHE_MAXELEMENTSIZE`
Environment path: `VIKUNJA_TYPESENSE_APIKEY`
---
@ -566,7 +567,7 @@ Environment path: `VIKUNJA_REDIS_HOST`
### password
The password used to authenicate against the redis server
The password used to authenticate against the redis server
Default: `<empty>`
@ -595,7 +596,7 @@ Environment path: `VIKUNJA_REDIS_DB`
### enable
Whether to enable or disable cors headers.
Note: If you want to put the frontend and the api on seperate domains or ports, you will need to enable this.
Note: If you want to put the frontend and the api on separate domains or ports, you will need to enable this.
Otherwise the frontend won't be able to make requests to the api through the browser.
Default: `true`
@ -853,7 +854,7 @@ Environment path: `VIKUNJA_LOG_ECHO`
Whether or not to log events. Useful for debugging. Possible values are stdout, stderr, file or off to disable events logging.
Default: `stdout`
Default: `off`
Full path: `log.events`
@ -871,6 +872,28 @@ Full path: `log.eventslevel`
Environment path: `VIKUNJA_LOG_EVENTSLEVEL`
### mail
Whether or not to log mail log messages. This will not log mail contents. Possible values are stdout, stderr, file or off to disable mail-related logging.
Default: `off`
Full path: `log.mail`
Environment path: `VIKUNJA_LOG_MAIL`
### maillevel
The log level for mail log messages. Possible values (case-insensitive) are ERROR, WARNING, INFO, DEBUG.
Default: `info`
Full path: `log.maillevel`
Environment path: `VIKUNJA_LOG_MAILLEVEL`
---
## ratelimit
@ -969,17 +992,6 @@ Environment path: `VIKUNJA_FILES_MAXSIZE`
### wunderlist
These are the settings for the wunderlist migrator
Default: `<empty>`
Full path: `migration.wunderlist`
Environment path: `VIKUNJA_MIGRATION_WUNDERLIST`
### todoist
Default: `<empty>`
@ -1032,7 +1044,7 @@ Environment path: `VIKUNJA_AVATAR_GRAVATAREXPIRATION`
### enabled
Whether to enable backgrounds for lists at all.
Whether to enable backgrounds for projects at all.
Default: `true`
@ -1088,7 +1100,7 @@ The Key Value Storage is used for different kinds of things like metrics and a f
### type
The type of the storage backend. Can be either "memory" or "redis". If "redis" is chosen it needs to be configured seperately.
The type of the storage backend. Can be either "memory" or "redis". If "redis" is chosen it needs to be configured separately.
Default: `memory`
@ -1123,7 +1135,7 @@ The provider needs to support the `openid`, `profile` and `email` scopes.<br/>
If the email is not public in those cases, authenticating will fail.
**Note 2:** The frontend expects to be redirected after authentication by the third party
to <frontend-url>/auth/openid/<auth key>. Please make sure to configure the redirect url with your third party
auth service accordingy if you're using the default vikunja frontend.
auth service accordingly if you're using the default vikunja frontend.
Take a look at the [default config file](https://kolaente.dev/vikunja/api/src/branch/main/config.yml.sample) for more information about how to configure openid authentication.
Default: `<empty>`
@ -1143,7 +1155,7 @@ Prometheus metrics endpoint
### enabled
If set to true, enables a /metrics endpoint for prometheus to collect metrics about Vikunja.
If set to true, enables a /metrics endpoint for prometheus to collect metrics about Vikunja. You can query it from `/api/v1/metrics`.
Default: `false`
@ -1259,15 +1271,15 @@ Full path: `defaultsettings.overdue_tasks_reminders_time`
Environment path: `VIKUNJA_DEFAULTSETTINGS_OVERDUE_TASKS_REMINDERS_TIME`
### default_list_id
### default_project_id
The id of the default list. Make sure users actually have access to this list when setting this value.
The id of the default project. Make sure users actually have access to this project when setting this value.
Default: `0`
Full path: `defaultsettings.default_list_id`
Full path: `defaultsettings.default_project_id`
Environment path: `VIKUNJA_DEFAULTSETTINGS_DEFAULT_LIST_ID`
Environment path: `VIKUNJA_DEFAULTSETTINGS_DEFAULT_PROJECT_ID`
### week_start

View File

@ -76,7 +76,7 @@ This defines four services, each with their own container:
* An api service which runs the vikunja api. Most of the core logic lives here.
* The frontend which will make vikunja actually usable for most people.
* A database container which will store all lists, tasks, etc. We're using mariadb here, but you're free to use mysql or postgres if you want.
* A database container which will store all projects, tasks, etc. We're using mariadb here, but you're free to use mysql or postgres if you want.
* A proxy service which makes the frontend and api available on the same port, redirecting all requests to `/api` to the api container.
If you already have a proxy on your host, you may want to check out the [reverse proxy examples]() to use that.
By default, it uses port 80 on the host.
@ -201,7 +201,6 @@ You should see something like this:
"max_file_size": "20MB",
"registration_enabled": true,
"available_migrators": [
"wunderlist",
"todoist"
],
"task_attachments_enabled": true

View File

@ -10,13 +10,13 @@ menu:
# Full docker example
This docker compose configuration will run Vikunja with backend and frontend with a mariadb as database.
This docker compose configuration will run Vikunja with backend and frontend with a mariadb database.
It uses an nginx container or traefik on the host to proxy backend and frontend into a single port.
For all available configuration options, see [configuration]({{< ref "config.md">}}).
<div class="notification is-warning">
<b>NOTE:</b> If you intend to run Vikunja with mysql and/or to use non-latin characters
<b>NOTE:</b> If you intend to run Vikunja with mysql and/or to use non-latin characters
<a href="{{< ref "utf-8.md">}}">make sure your db is utf-8 compatible</a>.<br/>
All examples on this page already reflect this and do not require additional work.
</div>
@ -25,8 +25,7 @@ All examples on this page already reflect this and do not require additional wor
## Redis
While Vikunja has support to use redis as a caching backend, you'll probably not need it unless you're using Vikunja
with more than a handful of users.
While Vikunja has support to use redis as a caching backend, you'll probably not need it unless you're using Vikunja with more than a handful of users.
To use redis, you'll need to add this to the config examples below:
@ -66,19 +65,45 @@ db:
You'll also need to change the `VIKUNJA_DATABASE_TYPE` to `postgres` on the api container declaration.
<div class="notification is-warning">
<b>NOTE:</b> The mariadb container can sometimes take a while to initialize, especially on the first run.
During this time, the api container will fail to start at all. It will automatically restart every few seconds.
<b>NOTE:</b> The mariadb container can sometimes take a while to initialize, especially on the first run. During this time, the api container will fail to start at all. It will automatically restart every few seconds.
</div>
## Sqlite
Vikunja supports postgres, mysql and sqlite as a database backend. The examples on this page use mysql with a mariadb container.
To use sqlite as a database backend, change the `api` section of the examples to this:
{{< highlight yaml >}}
api:
image: vikunja/api
environment:
VIKUNJA_SERVICE_JWTSECRET: <a super secure random secret>
VIKUNJA_SERVICE_FRONTENDURL: http://<your public frontend url with slash>/
# Note the default path is /app/vikunja/vikunja.db This moves to a different folder so you can use a volume and store this outside of the container so state is persisted even if container destroyed.
VIKUNJA_DATABASE_PATH: /db/vikunja.db
ports:
- 3456:3456
volumes:
- ./files:/app/vikunja/files
- ./db:/db
restart: unless-stopped
{{< /highlight >}}
The default path Vikunja uses for sqlite is relative to the binary, which in the docker container would be `/app/vikunja/vikunja.db`. This config moves to a different folder using `VIKUNJA_DATABASE_PATH` so you can use a volume at `/db` and store this outside of the container so state is persisted even if container destroyed.
You'll also need to remove or change the `VIKUNJA_DATABASE_TYPE` to `sqlite` on the api container declaration.
You can also remove the db section.
<div class="notification is-warning">
<b>NOTE:</b> If you'll use your instance with more than a handful of users, we recommend using mysql or postgres.
</div>
## Example without any proxy
This example lets you host Vikunja without any reverse proxy in front of it. This is the absolute minimum configuration
you need to get something up and running. If you want to host Vikunja on one single port instead of two different ones
or need tls termination, check out one of the other examples.
This example lets you host Vikunja without any reverse proxy in front of it. This is the absolute minimum configuration you need to get something up and running. If you want to host Vikunja on one single port instead of two different ones or need tls termination, check out one of the other examples.
Not that you need to change the `VIKUNJA_API_URL` environment variable to the ip (the docker host you're running this on)
is reachable at. Because the browser you'll use to access the Vikunja frontend uses that url to make the requests, it
has to be able to reach that ip + port from the outside. Putting everything in a private network won't work.
Note that you need to change the `VIKUNJA_API_URL` environment variable to the ip (the docker host you're running this on) is reachable at. Because the browser you'll use to access the Vikunja frontend uses that url to make the requests, it has to be able to reach that ip + port from the outside. Putting everything in a private network won't work.
{{< highlight yaml >}}
version: '3'
@ -125,7 +150,7 @@ services:
This example assumes [traefik](https://traefik.io) version 2 installed and configured to [use docker as a configuration provider](https://docs.traefik.io/providers/docker/).
We also make a few assumtions here which you'll most likely need to adjust for your traefik setup:
We also make a few assumptions here which you'll most likely need to adjust for your traefik setup:
* Your domain is `vikunja.example.com`
* The entrypoint you want to make vikunja available from is called `https`
@ -155,7 +180,7 @@ services:
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.vikunja-api.rule=Host(`vikunja.example.com`) && PathPrefix(`/api/v1`, `/dav/`, `/.well-known/`)"
- "traefik.http.routers.vikunja-api.rule=Host(`vikunja.example.com`) && (PathPrefix(`/api/v1`) || PathPrefix(`/dav/`) || PathPrefix(`/.well-known/`))"
- "traefik.http.routers.vikunja-api.entrypoints=https"
- "traefik.http.routers.vikunja-api.tls.certResolver=acme"
frontend:
@ -235,7 +260,7 @@ services:
image: mariadb:10
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: supersupersecret
MYSQL_ROOT_PASSWORD: supersupersecret
MYSQL_USER: vikunja
MYSQL_PASSWORD: supersecret
MYSQL_DATABASE: vikunja
@ -343,7 +368,7 @@ services:
image: mariadb:10
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: supersecret
MYSQL_ROOT_PASSWORD: supersecret
MYSQL_USER: vikunja
MYSQL_PASSWORD: secret
MYSQL_DATABASE: vikunja
@ -360,7 +385,7 @@ services:
VIKUNJA_DATABASE_DATABASE: vikunja
VIKUNJA_SERVICE_JWTSECRET: <a super secure random secret>
VIKUNJA_SERVICE_FRONTENDURL: https://<your public frontend url with slash>/
volumes:
volumes:
- ./files:/app/vikunja/files
depends_on:
- db
@ -398,7 +423,7 @@ docker main folders:
* vikunja
* mariadb
Synology has it's own GUI for managing Docker containers... But it's easier via docker compose.
Synology has its own GUI for managing Docker containers... But it's easier via docker compose.
To do that, you can
@ -406,8 +431,8 @@ To do that, you can
* without activating SSH as a "custom script" (go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script)
* without activating SSH, by using Portainer (you have to install first, check out [this tutorial](https://www.portainer.io/blog/how-to-install-portainer-on-a-synology-nas) for exmple):
1. Go to **Dashboard / Stacks** click the button **"Add Stack"**
2. Give it the name Vikunja and paste the adapted docker compose file
3. Deploy the Stack with the "Delpoy Stack" button:
2. Give it the name Vikunja and paste the adapted docker compose file
3. Deploy the Stack with the "Deploy Stack" button:
![Portainer Stack deploy](/docs/synology-proxy-2.png)
@ -459,4 +484,3 @@ You may want to change the volumes to match the rest of your setup.
Once deployed, you might want to change the [`PUID` and `GUID` settings]({{< ref "install-backend.md">}}#setting-user-and-group-id-of-the-user-running-vikunja) or [set the time zone]({{< ref "config.md">}}#timezone).
After registering all your users, you might also want to [disable the user registration]({{<ref "config.md">}}#enableregistration).

View File

@ -102,7 +102,7 @@ It will automatically run all necessary database migrations.
## Docker
(Note: this assumes some familarity with docker)
(Note: this assumes some familiarity with docker)
Usage with docker is pretty straightforward:
@ -119,7 +119,7 @@ You can mount a local configuration like so:
docker run -p 3456:3456 -v /path/to/config/on/host.yml:/app/vikunja/config.yml:ro vikunja/api
{{< /highlight >}}
Though it is recommended to use eviroment variables or `.env` files to configure Vikunja in docker.
Though it is recommended to use environment variables or `.env` files to configure Vikunja in docker.
See [config]({{< ref "config.md">}}) for a list of available configuration options.
### Files volume
@ -129,7 +129,7 @@ You should mount the volume somewhere to the host to permanently store the files
### Setting user and group id of the user running vikunja
You can set the user and group id of the user running vikunja with the `PUID` and `PGID` evironment variables.
You can set the user and group id of the user running vikunja with the `PUID` and `PGID` environment variables.
This follows the pattern used by [the linuxserver.io](https://docs.linuxserver.io/general/understanding-puid-and-pgid) docker images.
This is useful to solve general permission problems when host-mounting volumes such as the volume used for task attachments.
@ -164,7 +164,7 @@ services:
- ./db:/var/lib/mysql
{{< /highlight >}}
See [full docker example]({{< ref "full-docker-example.md">}}) for more varations of this config.
See [full docker example]({{< ref "full-docker-example.md">}}) for more variations of this config.
## Debian packages

View File

@ -24,8 +24,7 @@ You also need to configure a rewrite condition to internally redirect all reques
By default, the frontend assumes it can reach the api at `/api/v1` relative to the frontend url.
This means that if you make the frontend available at, say `https://vikunja.example.com`, it tries to reach the api
at `https://vikunja.example.com/api/v1`.
In this scenario it is not possible for the frontend and the api to live on seperate servers or even just seperate
ports on the same server with [the use of a reverse proxy]({{< ref "reverse-proxies.md">}}).
In this scenario it is not possible for the frontend and the api to live on separate servers or even just separate ports on the same server with [the use of a reverse proxy]({{< ref "reverse-proxies.md">}}).
To make configurations like this possible, the api url can be set in the `index.html` file of the frontend releases.
Just open the file with a text editor - there are comments which will explain how to set the url.
@ -45,12 +44,9 @@ docker run -p 80:80 vikunja/frontend
which will run the docker image and expose port 80 on the host.
See [full docker example]({{< ref "full-docker-example.md">}}) for more varations of this config.
See [full docker example]({{< ref "full-docker-example.md">}}) for more variations of this config.
### Setting user and group id of the user running vikunja
You can set the user and group id of the user running vikunja with the `PUID` and `PGID` evironment variables.
This follows the pattern used by [the linuxserver.io](https://docs.linuxserver.io/general/understanding-puid-and-pgid) docker images.
The docker container runs as an unprivileged user and does not mount anything.
### API URL configuration in docker

View File

@ -56,3 +56,4 @@ A third-party Helm Chart is available from the k8s-at-home project [here](https:
* [Install Vikunja in Docker for self-hosted Task Tracking](https://smarthomepursuits.com/install-vikunja-in-docker-for-self-hosted-task-tracking/)
* [Self-Hosted To-Do List with Vikunja in Docker](https://www.youtube.com/watch?v=DqyqDWpEvKI) (Youtube)
* [Vikunja self-hosted (step by step)](https://nguyenminhhung.com/vikunja-self-hosted-step-by-step/)
* [How to Install Vikunja on Your Synology NAS](https://mariushosting.com/how-to-install-vikunja-on-your-synology-nas/)

View File

@ -8,8 +8,15 @@ menu:
parent: "setup"
---
# Hosting Vikunja with k8s
We have an official Helm Chart for Vikunja.
Check out [the repo](https://kolaente.dev/vikunja/helm-chart/) for more information about how to use it.
## Third-party Helm Charts
There are two third-party Helm-Charts which can be used to host Vikunja with k8s:
* [Truecharts](https://truecharts.org/docs/charts/stable/vikunja/)
* [Truecharts](https://truecharts.org/charts/stable/vikunja/)
* [k8s at Home](https://github.com/k8s-at-home/charts)

View File

@ -43,3 +43,48 @@ scopes:
- email
- profile
```
## Google / Google Workspace
Vikunja Config:
```yaml
openid:
enabled: true
redirecturl: https://vikunja.mydomain.com/auth/openid/ <---- slash at the end is important
providers:
- name: Google
authurl: https://accounts.google.com
clientid: <google-oauth-client-id>
clientsecret: <google-oauth-client-secret>
```
Google config:
- Navigate to `https://console.cloud.google.com/apis/credentials` in the target project
- Create a new OAuth client ID
- Configure an authorized redirect URI of `https://vikunja.mydomain.com/auth/openid/google`
Note that there currently seems to be no way to stop creation of new users, even when `enableregistration` is `false` in the configuration. This means that this approach works well only with an "Internal Organization" app for Google Workspace, which limits the allowed users to organizational accounts only. External / public applications will potentially allow every Google user to register.
## Keycloak
Vikunja Config:
```yaml
openid:
enabled: true
redirecturl: https://vikunja.mydomain.com/auth/openid/ <---- slash at the end is important
providers:
- name: Keycloak
authurl: https://keycloak.mydomain.com/realms/<relam-name>
logouturl: https://keycloak.mydomain.com/realms/<relam-name>/protocol/openid-connect/logout
clientid: <vikunja-id>
clientsecret: <vikunja secret>
```
Keycloak Config:
- Navigate to the keycloak instance
- Create a new client with the type `OpenID Connect` and a unique ID.
- Set `Client authentication` to On
- Set `Root Url` to `https://vikunja.mydomain.com`
- Set `Valid redirect URIs` to `/auth/openid/keycloak`
- Create the client the navigate to the credentials tab and copy the `Client secret`

View File

@ -86,15 +86,15 @@ server {
2. Verify that the page will pull up in your browser. (Do not bother trying to log in. It won't work. Trust me.)
3. Now, we'll work with the NPM container, so you need to identify the container name for your NPM installation. e.g. NGINX-PM
4. From the command line, enter `sudo docker exec -it [NGINX-PM container name] /bin/bash` and navigate to the proxy hosts folder where the `.conf` files are stashed. Probably `/data/nginx/proxy_host`. (This folder is a persistent folder created in the NPM container and mounted by NPM.)
5. Locate the `.conf` file where the server_name inside the file matches your Vikunja Proxy Host. Once found, add the following code, unchanged, just above the existing location block in that file. (They are listed by number, not name.)
```
5. Locate the `.conf` file where the server_name inside the file matches your Vikunja Proxy Host. Once found, add the following code, unchanged, just above the existing location block in that file. (They are listed by number, not name.)
```nginx
location ~* ^/(api|dav|\.well-known)/ {
proxy_pass http://api:3456;
client_max_body_size 20M;
}
proxy_pass http://api:3456;
client_max_body_size 20M;
}
```
6. After saving the edited file, return to NPM's UI browser window and refresh the page to verify your Proxy Host for Vikunja is still online.
7. Now, switch over to your Vikunja browswer window and hit refresh. If you configured your URL correctly in original Vikunja container, you should be all set and the browser will correctly show Vikunja. If not, you'll need to adjust the address in the top of the login subscreen to match your proxy address.
6. After saving the edited file, return to NPM's UI browser window and refresh the page to verify your Proxy Host for Vikunja is still online.
7. Now, switch over to your Vikunja browser window and hit refresh. If you configured your URL correctly in original Vikunja container, you should be all set and the browser will correctly show Vikunja. If not, you'll need to adjust the address in the top of the login subscreen to match your proxy address.
## Apache
@ -125,3 +125,23 @@ Put the following config in `cat /etc/apache2/sites-available/vikunja.conf`:
**Note:** The apache modules `proxy`, `proxy_http` and `rewrite` must be enabled for this.
For more details see the [frontend apache configuration]({{< ref "install-frontend.md#apache">}}).
## Caddy
{{< highlight conf >}}
vikunja.domainname.tld {
@paths {
path /api/* /.well-known/* /dav/*
}
handle @paths {
reverse_proxy 127.0.0.1:3456
}
handle {
encode zstd gzip
root * /var/www/html/vikunja
try_files {path} index.html
file_server
}
}
{{< /highlight >}}

View File

@ -17,15 +17,27 @@ However, you can still run it in a subdirectory but need to build the frontend y
First, make sure you're able to build the frontend from source.
Check [the guide about building from source]({{< ref "build-from-source.md">}}#frontend) about that.
Then, run
### Dynamicly set with build command
Run the build with the `VIKUNJA_FRONTEND_BASE` variable specified.
```
pnpm vite build --base=/SUBPATH
pnpm workbox copyLibraries dist/
VIKUNJA_FRONTEND_BASE=/SUBPATH/ pnpm run build
```
Where `SUBPATH` is the subdirectory you want to run Vikunja on.
### Set via .env.local
* Copy `.env.local.example` to `.env.local`
* Uncomment `VIKUNJA_FRONTEND_BASE` and set `/subpath/` to the desired path.
After saving, build Vikunja as normal.
```
pnpm run build
```
Once you have the build files you can deploy them as usual.
Note that when deploying in docker you'll need to put the files in a web container yourself, you
can't use the `Dockerfile` in the repo without modifications.

View File

@ -11,11 +11,9 @@ menu:
# UTF-8 Settings
Vikunja itself is always fully capable of handling utf-8 characters.
However, your database might be not.
Vikunja itself will work just fine until you want to use non-latin characters in your tasks/lists/etc.
However, your database might be not. Vikunja itself will work just fine until you want to use non-latin characters in your tasks/projects/etc.
On this page, you will find information about how to fully ensure non-latin characters like aüäß or emojis work
with your installation.
On this page, you will find information about how to fully ensure non-latin characters like *aüäß* or emojis work with your installation.
{{< table_of_contents >}}
@ -57,8 +55,7 @@ Before attempting any conversion, please [back up your database]({{< ref "backup
### 1. Create a pre-conversion script
Copy the following sql statements in a file called `preAlterTables.sql` and replace all occurences of `vikunja` with
the name of your database:
Copy the following sql statements in a file called `preAlterTables.sql` and replace all occurrences of `vikunja` with the name of your database:
{{< highlight sql >}}
use information_schema;

View File

@ -19,7 +19,7 @@ The Vikunja api and frontend are available in two different release flavors.
Stable releases have a fixed version number like `0.18.2` and are published at irregular intervals whenever a new version is ready.
They receive few bugfixes and security patches.
We use [Semantic Versioning](#) for these releases.
We use [Semantic Versioning](https://semver.org) for these releases.
## Unstable

View File

@ -10,10 +10,10 @@ menu:
# API Documentation
You can find the api docs under `http://vikunja.tld/api/v1/docs` of your instance.
You can find the api docs under `http://vikunja.tld/api/v1/docs` of your instance.<br />
A public instance is available on [try.vikunja.io](https://try.vikunja.io/api/v1/docs).
These docs are autgenerated from annotations in the code with swagger.
These docs are autogenerated from annotations in the code with swagger.
The specification is hosted at `http://vikunja.tld/api/v1/docs.json`.
You can use this to embed it into other openapi compatible applications if you want.
You can use this to embed it into other OpenAPI compatible applications if you want.

View File

@ -1,6 +1,6 @@
---
date: "2019-05-12:00:00+01:00"
title: "Caldav"
title: "CalDAV"
draft: false
type: "doc"
menu:
@ -8,11 +8,11 @@ menu:
parent: "usage"
---
# Caldav
# CalDAV
> **Warning:** The caldav integration is in an early alpha stage and has bugs.
> **Warning:** The CalDAV integration is in an early alpha stage and has bugs.
> It works well with some clients while having issues with others.
> If you encounter issues, please [report them](https://code.vikunja.io/api/issues/new?body=[caldav])
> If you encounter issues, please [report them](https://code.vikunja.io/api/issues/new?body=[caldav])
Vikunja supports managing tasks via the [caldav VTODO](https://tools.ietf.org/html/rfc5545#section-3.6.2) extension.
@ -24,10 +24,10 @@ All urls are located under the `/dav` subspace.
Urls are:
* `/principals/<username>/`: Returns urls for list discovery. *Use this url to initially make connections to new clients.*
* `/lists/`: Used to manage lists
* `/lists/<List ID>/`: Used to manage a single list
* `/lists/<List ID>/<Task UID>`: Used to manage a task on a list
* `/principals/<username>/`: Returns urls for project discovery. *Use this url to initially make connections to new clients.*
* `/projects/`: Used to manage projects
* `/projects/<Project ID>/`: Used to manage a single project
* `/projects/<Project ID>/<Task UID>`: Used to manage a task on a project
## Supported properties
@ -37,49 +37,50 @@ Vikunja currently supports the following properties:
* `SUMMARY`
* `DESCRIPTION`
* `PRIORITY`
* `CATEGORIES`
* `COMPLETED`
* `CREATED` (only Vikunja → Client)
* `DUE`
* `DTSTART`
* `DURATION`
* `ORGANIZER`
* `RELATED-TO`
* `CREATED`
* `DTSTAMP`
* `LAST-MODIFIED`
* `DTSTART`
* `LAST-MODIFIED` (only Vikunja → Client)
* `RRULE` (Recurrence) (only Vikunja → Client)
* `VALARM` (Reminders)
Vikunja **currently does not** support these properties:
* `ATTACH`
* `CATEGORIES`
* `CLASS`
* `COMMENT`
* `CONTACT`
* `GEO`
* `LOCATION`
* `ORGANIZER` (disabled)
* `PERCENT-COMPLETE`
* `RESOURCES`
* `STATUS`
* `CONTACT`
* `RECURRENCE-ID`
* `URL`
* Recurrence
* `RELATED-TO`
* `RESOURCES`
* `SEQUENCE`
* `STATUS`
* `URL`
## Tested Clients
### Working
* [Evolution](https://wiki.gnome.org/Apps/Evolution/)
* [OpenTasks](https://opentasks.app/) + [DAVx⁵](https://www.davx5.com/)
* [OpenTasks](https://opentasks.app/) & [DAVx⁵](https://www.davx5.com/)
* [Tasks (Android)](https://tasks.org/)
### Not working
* [Thunderbird (68)](https://www.thunderbird.net/)
* iOS calDAV Sync (See [#753](https://kolaente.dev/vikunja/api/issues/753))
* iOS CalDAV Sync (See [#753](https://kolaente.dev/vikunja/api/issues/753))
## Dev logs
The whole thing is not optimized at all and probably pretty inefficent.
The whole thing is not optimized at all and probably pretty inefficient.
Request body and headers are logged if the debug output is enabled.
@ -140,6 +141,4 @@ Requests from the app:::
And then it just stops.
... and complains about not being able to find the home set
... without even requesting it...
```

View File

@ -10,7 +10,7 @@ menu:
# Command line interface
You can interact with Vikunja using its `cli` interface.
You can interact with Vikunja using its `cli` interface.<br />
The following commands are available:
* [dump](#dump)
@ -31,7 +31,7 @@ All commands use the same standard [config file]({{< ref "../setup/config.md">}}
When running Vikunja in docker, you'll need to execute all commands in the `api` container.
Instead of running the `vikunja` binary directly, run it like this:
```
```sh
docker exec <name of the vikunja api container> /app/vikunja/vikunja <subcommand>
```
@ -80,12 +80,12 @@ Roll migrations back until a certain point.
Usage:
{{< highlight bash >}}
$ vikunja migrate rollback [flags]
$ vikunja migrate rollback [flags]
{{< /highlight >}}
Flags:
* `-n`, `--name` string: The id of the migration you want to roll back until.
### `restore`
Restores a previously created dump from a zip file, see `dump`.
@ -136,6 +136,21 @@ Flags:
* `-p`, `--password`: The password of the new user. You will be asked to enter it if not provided through the flag.
* `-u`, `--username`: The username of the new user.
#### `user delete`
Start the user deletion process.
If called without the `--now` flag, this command will only trigger an email to the user in order for them to confirm and start the deletion process (this is the same behavoir as if the user requested their deletion via the web interface).
With the flag the user is deleted **immediately**.
**USE WITH CAUTION.**
{{< highlight bash >}}
$ vikunja user delete <id> <flags>
{{< /highlight >}}
Flags:
* `-n`, `--now` If provided, deletes the user immediately instead of emailing them first.
#### `user list`
Shows a list of all users.
@ -179,7 +194,7 @@ This is either the semantic version (something like `0.7`) or version + git comm
Usage:
{{< highlight bash >}}
$ vikunja version
$ vikunja version
{{< /highlight >}}
### `web`
@ -188,5 +203,5 @@ Starts Vikunja's REST api server.
Usage:
{{< highlight bash >}}
$ vikunja web
$ vikunja web
{{< /highlight >}}

View File

@ -24,24 +24,26 @@ This document describes the different errors Vikunja can return.
| ErrorCode | HTTP Status Code | Description |
|-----------|------------------|-------------|
| 1001 | 400 | A user with this username already exists. |
| 1002 | 400 | A user with this email address already exists. |
| 1004 | 400 | No username and password specified. |
| 1005 | 404 | The user does not exist. |
| 1006 | 400 | Could not get the user id. |
| 1008 | 412 | No password reset token provided. |
| 1009 | 412 | Invalid password reset token. |
| 1010 | 412 | Invalid email confirm token. |
| 1011 | 412 | Wrong username or password. |
| 1012 | 412 | Email address of the user not confirmed. |
| 1013 | 412 | New password is empty. |
| 1014 | 412 | Old password is empty. |
| 1015 | 412 | Totp is already enabled for this user. |
| 1016 | 412 | Totp is not enabled for this user. |
| 1017 | 412 | The provided Totp passcode is invalid. |
| 1018 | 412 | The provided user avatar provider type setting is invalid. |
| 1019 | 412 | No openid email address was provided. |
| 1020 | 412 | This user account is disabled. |
| 1001 | 400 | A user with this username already exists. |
| 1002 | 400 | A user with this email address already exists. |
| 1004 | 400 | No username and password specified. |
| 1005 | 404 | The user does not exist. |
| 1006 | 400 | Could not get the user id. |
| 1008 | 412 | No password reset token provided. |
| 1009 | 412 | Invalid password reset token. |
| 1010 | 412 | Invalid email confirm token. |
| 1011 | 412 | Wrong username or password. |
| 1012 | 412 | Email address of the user not confirmed. |
| 1013 | 412 | New password is empty. |
| 1014 | 412 | Old password is empty. |
| 1015 | 412 | Totp is already enabled for this user. |
| 1016 | 412 | Totp is not enabled for this user. |
| 1017 | 412 | The provided Totp passcode is invalid. |
| 1018 | 412 | The provided user avatar provider type setting is invalid. |
| 1019 | 412 | No openid email address was provided. |
| 1020 | 412 | This user account is disabled. |
| 1021 | 412 | This account is managed by a third-party authentication provider. |
| 1021 | 412 | The username must not contain spaces. |
## Validation
@ -50,32 +52,35 @@ This document describes the different errors Vikunja can return.
| 2001 | 400 | ID cannot be empty or 0. |
| 2002 | 400 | Some of the request data was invalid. The response contains an aditional array with all invalid fields. |
## List
## Project
| 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". |
| 3010 | 412 | The list must belong to a namespace. |
| ErrorCode | HTTP Status Code | Description |
|-----------|------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| 3001 | 404 | The project does not exist. |
| 3004 | 403 | The user needs to have read permissions on that project to perform that action. |
| 3005 | 400 | The project title cannot be empty. |
| 3006 | 404 | The project share does not exist. |
| 3007 | 400 | A project with this identifier already exists. |
| 3008 | 412 | The project is archived and can therefore only be accessed read only. This is also true for all tasks associated with this project. |
| 3009 | 412 | The project cannot belong to a dynamically generated parent project like "Favorites". |
| 3010 | 412 | This project cannot be a child of itself. |
| 3011 | 412 | This project cannot have a cyclic relationship to a parent project. |
| 3012 | 412 | This project cannot be deleted because a user has set it as their default project. |
| 3013 | 412 | This project cannot be archived because a user has set it as their default project. |
## Task
| ErrorCode | HTTP Status Code | Description |
|-----------|------------------|-------------|
| 4001 | 400 | The list task text cannot be empty. |
| 4002 | 404 | The list task does not exist. |
| 4003 | 403 | All bulk editing tasks must belong to the same list. |
| 4001 | 400 | The project task text cannot be empty. |
| 4002 | 404 | The project task does not exist. |
| 4003 | 403 | All bulk editing tasks must belong to the same project. |
| 4004 | 403 | Need at least one task when bulk editing tasks. |
| 4005 | 403 | The user does not have the right to see the task. |
| 4006 | 403 | The user tried to set a parent task as the task itself. |
| 4007 | 400 | The user tried to create a task relation with an invalid kind of relation. |
| 4008 | 409 | The user tried to create a task relation which already exists. |
| 4009 | 404 | The task relation does not exist. |
| 4009 | 404 | The task relation does not exist. |
| 4010 | 400 | Cannot relate a task with itself. |
| 4011 | 404 | The task attachment does not exist. |
| 4012 | 400 | The task attachment is too large. |
@ -88,36 +93,25 @@ This document describes the different errors Vikunja can return.
| 4019 | 400 | Invalid task filter value. |
| 4020 | 400 | The provided attachment does not belong to that task. |
| 4021 | 400 | This user is already assigned to that task. |
## Namespace
| ErrorCode | HTTP Status Code | Description |
|-----------|------------------|-------------|
| 5001 | 404 | The namspace does not exist. |
| 5003 | 403 | The user does not have access to the specified namespace. |
| 5006 | 400 | The namespace name cannot be empty. |
| 5009 | 403 | The user needs to have namespace read access to perform that action. |
| 5010 | 403 | This team does not have access to that namespace. |
| 5011 | 409 | This user has already access to that namespace. |
| 5012 | 412 | The namespace is archived and can therefore only be accessed read only. |
| 4022 | 400 | The task has a relative reminder which does not specify relative to what. |
## Team
| ErrorCode | HTTP Status Code | Description |
|-----------|------------------|-------------|
| 6001 | 400 | The team name cannot be emtpy. |
| 6002 | 404 | The team does not exist. |
| 6004 | 409 | The team already has access to that namespace or list. |
| 6005 | 409 | The user is already a member of that team. |
| 6006 | 400 | Cannot delete the last team member. |
| 6007 | 403 | The team does not have access to the list to perform that action. |
| ErrorCode | HTTP Status Code | Description |
|-----------|------------------|----------------------------------------------------------------------|
| 6001 | 400 | The team name cannot be empty. |
| 6002 | 404 | The team does not exist. |
| 6004 | 409 | The team already has access to that project. |
| 6005 | 409 | The user is already a member of that team. |
| 6006 | 400 | Cannot delete the last team member. |
| 6007 | 403 | The team does not have access to the project to perform that action. |
## User List Access
## User Project Access
| ErrorCode | HTTP Status Code | Description |
|-----------|------------------|-------------|
| 7002 | 409 | The user already has access to that list. |
| 7003 | 403 | The user does not have access to that list. |
| 7002 | 409 | The user already has access to that project. |
| 7003 | 403 | The user does not have access to that project. |
## Label
@ -131,24 +125,24 @@ This document describes the different errors Vikunja can return.
| ErrorCode | HTTP Status Code | Description |
|-----------|------------------|-------------|
| 9001 | 403 | The right is invalid. |
| 9001 | 403 | The right is invalid. |
## Kanban
| ErrorCode | HTTP Status Code | Description |
|-----------|------------------|-------------|
| 10001 | 404 | The bucket does not exist. |
| 10002 | 400 | The bucket does not belong to that list. |
| 10003 | 412 | You cannot remove the last bucket on a list. |
| 10002 | 400 | The bucket does not belong to that project. |
| 10003 | 412 | You cannot remove the last bucket on a project. |
| 10004 | 412 | You cannot add the task to this bucket as it already exceeded the limit of tasks it can hold. |
| 10005 | 412 | There can be only one done bucket per list. |
| 10005 | 412 | There can be only one done bucket per project. |
## Saved Filters
| ErrorCode | HTTP Status Code | Description |
|-----------|------------------|-------------|
| 11001 | 404 | The saved filter does not exist. |
| 11002 | 412 | Saved filters are not available for link shares. |
| 11002 | 412 | Saved filters are not available for link shares. |
## Subscriptions
@ -159,7 +153,8 @@ This document describes the different errors Vikunja can return.
## Link Shares
| ErrorCode | HTTP Status Code | Description |
|-----------|------------------|-------------|
| ErrorCode | HTTP Status Code | Description |
|-----------|------------------|--------------------------------------------------------------------------------|
| 13001 | 412 | This link share requires a password for authentication, but none was provided. |
| 13002 | 403 | The provided link share password was invalid. |
| 13002 | 403 | The provided link share password is invalid. |
| 13003 | 400 | The provided link share token is invalid. |

View File

@ -10,16 +10,16 @@ menu:
# Available task relation kinds
| Code | Description |
|------|-------------|
| subtask | Task is a subtask of the other task. This is the opposite of `parenttask`. |
| parenttask | Task is a parent task of the other task. This is the opposite of `subtask`. |
| related | Both tasks are related to each other. How is not more specified. |
| duplicateof | Task is a duplicate of the other task. This is the opposite of `duplicates`. |
| duplicates | Task duplicates the other task. This is the opposite of `duplicateof`. |
| blocking | Task is blocking the other task. This is the opposite of `blocked`. |
| blocked | Task is blocked by the other task. This is the opposite of `blocking`. |
| precedes | Task precedes the other task. This is the opposite of `follows`. |
| follows | Task follows the other task. This is the opposite of `precedes`. |
| copiedfrom | Task is copied from the other task. This is the opposite of `copiedto`. |
| copiedto | Task is copied to the other task. This is the opposite of `copiedfrom`. |
| Code | Description | Opposite of |
|------|-------------|-------------|
| `subtask` | Task is a subtask of the other task. | `parenttask` |
| `parenttask` | Task is a parent task of the other task. | `subtask` |
| `related` | Both tasks are related to each other.<br /> How is not more specified. | ⸺ |
| `duplicateof` | Task is a duplicate of the other task. | `duplicates` |
| `duplicates` | Task duplicates the other task. | `duplicateof` |
| `blocking` | Task is blocking the other task. | `blocked` |
| `blocked` | Task is blocked by the other task. | `blocking` |
| `precedes` | Task precedes the other task. | `follows` |
| `follows` | Task follows the other task. | `precedes` |
| `copiedfrom` | Task is copied from the other task. | `copiedto` |
| `copiedto` | Task is copied to the other task. | `copiedfrom` |

View File

@ -8,22 +8,22 @@ menu:
parent: "usage"
---
# List and namespace rights for teams and users
# Project rights for teams and users
Whenever you share a list or namespace with a user or team, you can specify a `rights` parameter.
Whenever you share a project with a user or team, you can specify a `rights` parameter.
This parameter controls the rights that team or user is going to have (or has, if you request the current sharing status).
Rights are being specified using integers.
The following values are possible:
| Right (int) | Meaning |
|-------------|---------|
| 0 (Default) | Read only. Anything which is shared with this right cannot be edited. |
| 1 | Read and write. Namespaces or lists shared with this right can be read and written to by the team or user. |
| 2 | Admin. Can do anything like read and write, but can additionally manage sharing options. |
| Right (int) | Meaning |
|-------------|-------------------------------------------------------------------------------------------------|
| 0 (Default) | Read only. Anything which is shared with this right cannot be edited. |
| 1 | Read and write. Projects shared with this right can be read and written to by the team or user. |
| 2 | Admin. Can do anything like read and write, but can additionally manage sharing options. |
## Team admins
When adding or querying a team, every member has an additional boolean value stating if it is admin or not.
A team admin can also add and remove team members and also change whether a user in the team is admin or not.
A team admin can also add and remove team members and also change whether a user in the team is admin or not.

174
go.mod
View File

@ -18,137 +18,167 @@ module code.vikunja.io/api
require (
code.vikunja.io/web v0.0.0-20210706160506-d85def955bd3
gitea.com/xorm/xorm-redis-cache v0.2.0
github.com/ThreeDotsLabs/watermill v1.1.1
dario.cat/mergo v1.0.0
github.com/ThreeDotsLabs/watermill v1.2.0
github.com/adlio/trello v1.10.0
github.com/arran4/golang-ical v0.0.0-20220517104411-fd89fefb0182
github.com/arran4/golang-ical v0.1.0
github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef
github.com/bbrks/go-blurhash v1.1.1
github.com/c2h5oh/datasize v0.0.0-20220606134207-859f65c6625b
github.com/coreos/go-oidc/v3 v3.4.0
github.com/coreos/go-oidc/v3 v3.6.0
github.com/cweill/gotests v1.6.0
github.com/d4l3k/messagediff v1.2.1
github.com/disintegration/imaging v1.6.2
github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0
github.com/gabriel-vasile/mimetype v1.4.1
github.com/getsentry/sentry-go v0.15.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.1
github.com/golang-jwt/jwt/v4 v4.4.2
github.com/dustinkirkland/golang-petname v0.0.0-20230626224747-e794b9370d49
github.com/gabriel-vasile/mimetype v1.4.2
github.com/getsentry/sentry-go v0.23.0
github.com/go-sql-driver/mysql v1.7.1
github.com/go-testfixtures/testfixtures/v3 v3.9.0
github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d
github.com/golang-jwt/jwt/v5 v5.0.0
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/google/uuid v1.3.1
github.com/hashicorp/go-version v1.6.0
github.com/iancoleman/strcase v0.3.0
github.com/jinzhu/copier v0.3.5
github.com/labstack/echo/v4 v4.9.1
github.com/jszwedko/go-datemath v0.1.1-0.20230526204004-640a500621d6
github.com/labstack/echo-jwt/v4 v4.2.0
github.com/labstack/echo/v4 v4.11.1
github.com/labstack/gommon v0.4.0
github.com/lib/pq v1.10.7
github.com/magefile/mage v1.14.0
github.com/mattn/go-sqlite3 v1.14.16
github.com/lib/pq v1.10.9
github.com/magefile/mage v1.15.0
github.com/mattn/go-sqlite3 v1.14.17
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.14.0
github.com/pquerna/otp v1.4.0
github.com/prometheus/client_golang v1.16.0
github.com/redis/go-redis/v9 v9.0.5
github.com/robfig/cron/v3 v3.0.1
github.com/samedi/caldav-go v3.0.0+incompatible
github.com/spf13/afero v1.9.2
github.com/spf13/cobra v1.6.1
github.com/spf13/viper v1.14.0
github.com/stretchr/testify v1.8.1
github.com/swaggo/swag v1.8.7
github.com/spf13/afero v1.9.5
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.16.0
github.com/stretchr/testify v1.8.4
github.com/swaggo/swag v1.8.12
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.3.4
github.com/yuin/goldmark v1.5.2
golang.org/x/crypto v0.1.0
golang.org/x/image v0.1.0
golang.org/x/oauth2 v0.1.0
golang.org/x/sync v0.1.0
golang.org/x/sys v0.2.0
golang.org/x/term v0.2.0
github.com/ulule/limiter/v3 v3.11.2
github.com/wneessen/go-mail v0.4.0
github.com/yuin/goldmark v1.5.4
golang.org/x/crypto v0.12.0
golang.org/x/image v0.11.0
golang.org/x/oauth2 v0.10.0
golang.org/x/sync v0.3.0
golang.org/x/sys v0.11.0
golang.org/x/term v0.11.0
gopkg.in/d4l3k/messagediff.v1 v1.2.1
gopkg.in/yaml.v3 v3.0.1
src.techknowlogick.com/xgo v1.5.1-0.20220906164532-735bfdfb90d9
src.techknowlogick.com/xgo v1.7.1-0.20230711181658-617d3b65dd40
src.techknowlogick.com/xormigrate v1.5.0
xorm.io/builder v0.3.12
xorm.io/builder v0.3.13
xorm.io/xorm v1.3.2
)
require (
github.com/ClickHouse/ch-go v0.55.0 // indirect
github.com/ClickHouse/clickhouse-go/v2 v2.9.1 // indirect
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/beevik/etree v1.1.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect
github.com/cenkalti/backoff/v3 v3.0.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/bytedance/sonic v1.10.0 // indirect
github.com/cenkalti/backoff/v3 v3.2.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
github.com/chenzhuoyu/iasm v0.9.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deepmap/oapi-codegen v1.13.4 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/garyburd/redigo v1.6.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-chi/chi v4.0.2+incompatible // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/gin-gonic/gin v1.9.1 // indirect
github.com/go-chi/chi/v5 v5.0.10 // indirect
github.com/go-faster/city v1.0.1 // indirect
github.com/go-faster/errors v0.6.1 // indirect
github.com/go-jose/go-jose/v3 v3.0.0 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.19.6 // indirect
github.com/go-openapi/spec v0.20.4 // indirect
github.com/go-openapi/swag v0.19.15 // indirect
github.com/goccy/go-json v0.9.11 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.15.1 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/laurent22/ical-go v0.1.1-0.20181107184520-7e5d6ade8eef // indirect
github.com/lithammer/shortuuid/v3 v3.0.4 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/lithammer/shortuuid/v3 v3.0.7 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/onsi/ginkgo v1.16.4 // indirect
github.com/onsi/gomega v1.16.0 // indirect
github.com/paulmach/orb v0.9.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.9 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/sony/gobreaker v0.5.0 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/syndtr/goleveldb v1.0.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/typesense/typesense-go v0.8.0 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/urfave/cli/v2 v2.3.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.1.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect
golang.org/x/tools v0.1.12 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/yosssi/gohtml v0.0.0-20201013000340-ee4748c638f4 // indirect
go.opentelemetry.io/otel v1.15.0 // indirect
go.opentelemetry.io/otel/trace v1.15.0 // indirect
golang.org/x/arch v0.4.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.11.1 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
replace (
github.com/samedi/caldav-go => github.com/kolaente/caldav-go v3.0.1-0.20190524174923-9e5cd1688227+incompatible // Branch: feature/dynamic-supported-components, PR: https://github.com/samedi/caldav-go/pull/6 and https://github.com/samedi/caldav-go/pull/7
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
)
replace github.com/samedi/caldav-go => github.com/kolaente/caldav-go v3.0.1-0.20190610114120-2a4eb8b5dcc9+incompatible // Branch: feature/dynamic-supported-components, PR: https://github.com/samedi/caldav-go/pull/6 and https://github.com/samedi/caldav-go/pull/7
go 1.19
go 1.20

718
go.sum

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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
@ -177,6 +177,9 @@ func init() {
// Some variables have external dependencies (like git) which may not always be available.
func initVars() {
Tags = os.Getenv("TAGS")
if !strings.Contains(Tags, "swagger") {
Tags += " swagger"
}
setVersion()
setBinLocation()
setPkgVersion()
@ -195,7 +198,11 @@ func runAndStreamOutput(cmd string, args ...string) {
stdout, _ := c.StdoutPipe()
errbuf := bytes.Buffer{}
c.Stderr = &errbuf
c.Start()
err := c.Start()
if err != nil {
fmt.Printf("Could not start: %s\n", err)
os.Exit(1)
}
reader := bufio.NewReader(stdout)
line, err := reader.ReadString('\n')
@ -337,9 +344,16 @@ func Fmt() {
runAndStreamOutput("gofmt", args...)
}
const swaggerDocsFolderLocation = `./pkg/swagger/`
// Generates the swagger docs from the code annotations
func DoTheSwag() {
mg.Deps(initVars)
if _, err := os.Stat(swaggerDocsFolderLocation + "swagger.json"); err == nil {
fmt.Println("Swagger docs already generated, not generating. Remove the files in " + swaggerDocsFolderLocation + " and run this command again to regenerate them.")
return
}
checkAndInstallGoTool("swag", "github.com/swaggo/swag/cmd/swag")
runAndStreamOutput("swag", "init", "-g", "./pkg/routes/routes.go", "--parseDependency", "-d", RootPath, "-o", RootPath+"/pkg/swagger")
}
@ -405,7 +419,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.47.3")
fmt.Println("curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.2")
os.Exit(1)
}
}
@ -446,12 +460,16 @@ func (Build) Clean() error {
if err := os.RemoveAll(BinLocation); err != nil && !os.IsNotExist(err) {
return err
}
if err := os.RemoveAll(swaggerDocsFolderLocation); err != nil && !os.IsNotExist(err) {
return err
}
return nil
}
// Builds a vikunja binary, ready to run
func (Build) Build() {
mg.Deps(initVars)
mg.Deps(DoTheSwag)
runAndStreamOutput("go", "build", Goflags[0], "-tags", Tags, "-ldflags", "-s -w "+Ldflags, "-o", Executable)
}
@ -461,6 +479,7 @@ type Release mg.Namespace
func (Release) Release(ctx context.Context) error {
mg.Deps(initVars)
mg.Deps(Release.Dirs)
mg.Deps(DoTheSwag)
// Run compiling in parallel to speed it up
errs, _ := errgroup.WithContext(ctx)
@ -502,6 +521,7 @@ func (Release) Dirs() error {
func runXgo(targets string) error {
mg.Deps(initVars)
mg.Deps(DoTheSwag)
checkAndInstallGoTool("xgo", "src.techknowlogick.com/xgo")
extraLdflags := `-linkmode external -extldflags "-static" `
@ -546,6 +566,20 @@ func (Release) Darwin() error {
return runXgo("darwin-10.15/*")
}
func (Release) Xgo(target string) error {
parts := strings.Split(target, "/")
if len(parts) < 2 {
return fmt.Errorf("invalid target")
}
variant := ""
if len(parts) > 2 && parts[2] != "" {
variant = "-" + strings.ReplaceAll(parts[2], "v", "")
}
return runXgo(parts[0] + "/" + parts[1] + variant)
}
// Compresses the built binaries in dist/binaries/ to reduce their filesize
func (Release) Compress(ctx context.Context) error {
// $(foreach file,$(filter-out $(wildcard $(wildcard $(DIST)/binaries/$(EXECUTABLE)-*mips*)),$(wildcard $(DIST)/binaries/$(EXECUTABLE)-*)), upx -9 $(file);)
@ -689,7 +723,7 @@ func (Release) Packages() error {
binpath := "nfpm"
err = exec.Command(binpath).Run()
if err != nil && strings.Contains(err.Error(), "executable file not found") {
binpath = "/nfpm"
binpath = "/usr/bin/nfpm"
err = exec.Command(binpath).Run()
}
if err != nil && strings.Contains(err.Error(), "executable file not found") {
@ -698,7 +732,7 @@ func (Release) Packages() error {
os.Exit(1)
}
// Because nfpm does not support templating, we replace the values in the config file and restore it after running
// Because nfpm does not support templating, we replace the values in the config file and restore it after running
nfpmConfigPath := RootPath + "/nfpm.yaml"
nfpmconfig, err := os.ReadFile(nfpmConfigPath)
if err != nil {
@ -736,7 +770,7 @@ func (Dev) MakeMigration() error {
date := time.Now().Format("20060102150405")
migration := `// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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
@ -22,7 +22,8 @@ import (
"strings"
"time"
"code.vikunja.io/api/pkg/config"
"code.vikunja.io/api/pkg/models"
"code.vikunja.io/api/pkg/user"
"code.vikunja.io/api/pkg/utils"
)
@ -30,19 +31,6 @@ import (
// DateFormat is the caldav date format
const DateFormat = `20060102T150405`
// Event holds a single caldav event
type Event struct {
Summary string
Description string
UID string
Alarms []Alarm
Color string
Timestamp time.Time
Start time.Time
End time.Time
}
// Todo holds a single VTODO
type Todo struct {
// Required
@ -57,11 +45,14 @@ type Todo struct {
Priority int64 // 0-9, 1 is highest
RelatedToUID string
Color string
Start time.Time
End time.Time
DueDate time.Time
Duration time.Duration
Categories []string
Start time.Time
End time.Time
DueDate time.Time
Duration time.Duration
RepeatAfter int64
RepeatMode models.TaskRepeatMode
Alarms []Alarm
Created time.Time
Updated time.Time // last-mod
@ -70,6 +61,8 @@ type Todo struct {
// Alarm holds infos about an alarm from a caldav event
type Alarm struct {
Time time.Time
Duration time.Duration
RelativeTo models.ReminderRelation
Description string
}
@ -97,58 +90,6 @@ X-OUTLOOK-COLOR:` + color + `
X-FUNAMBOL-COLOR:` + color
}
// ParseEvents parses an array of caldav events and gives them back as string
func ParseEvents(config *Config, events []*Event) (caldavevents string) {
caldavevents += `BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-PUBLISHED-TTL:PT4H
X-WR-CALNAME:` + config.Name + `
PRODID:-//` + config.ProdID + `//EN` + getCaldavColor(config.Color)
for _, e := range events {
if e.UID == "" {
e.UID = makeCalDavTimeFromTimeStamp(e.Timestamp) + utils.Sha256(e.Summary)
}
formattedDescription := ""
if e.Description != "" {
re := regexp.MustCompile(`\r?\n`)
formattedDescription = re.ReplaceAllString(e.Description, "\\n")
}
caldavevents += `
BEGIN:VEVENT
UID:` + e.UID + `
SUMMARY:` + e.Summary + getCaldavColor(e.Color) + `
DESCRIPTION:` + formattedDescription + `
DTSTAMP:` + makeCalDavTimeFromTimeStamp(e.Timestamp) + `
DTSTART:` + makeCalDavTimeFromTimeStamp(e.Start) + `
DTEND:` + makeCalDavTimeFromTimeStamp(e.End)
for _, a := range e.Alarms {
if a.Description == "" {
a.Description = e.Summary
}
caldavevents += `
BEGIN:VALARM
TRIGGER:` + calcAlarmDateFromReminder(e.Start, a.Time) + `
ACTION:DISPLAY
DESCRIPTION:` + a.Description + `
END:VALARM`
}
caldavevents += `
END:VEVENT`
}
caldavevents += `
END:VCALENDAR` // Need a line break
return
}
func formatDuration(duration time.Duration) string {
seconds := duration.Seconds() - duration.Minutes()*60
minutes := duration.Minutes() - duration.Hours()*60
@ -226,9 +167,24 @@ CREATED:` + makeCalDavTimeFromTimeStamp(t.Created)
PRIORITY:` + strconv.Itoa(mapPriorityToCaldav(t.Priority))
}
if t.RepeatAfter > 0 || t.RepeatMode == models.TaskRepeatModeMonth {
if t.RepeatMode == models.TaskRepeatModeMonth {
caldavtodos += `
RRULE:FREQ=MONTHLY;BYMONTHDAY=` + t.DueDate.Format("02") // Day of the month
} else {
caldavtodos += `
RRULE:FREQ=SECONDLY;INTERVAL=` + strconv.FormatInt(t.RepeatAfter, 10)
}
}
if len(t.Categories) > 0 {
caldavtodos += `
CATEGORIES:` + strings.Join(t.Categories, ",")
}
caldavtodos += `
LAST-MODIFIED:` + makeCalDavTimeFromTimeStamp(t.Updated)
caldavtodos += ParseAlarms(t.Alarms, t.Summary)
caldavtodos += `
END:VTODO`
}
@ -239,19 +195,42 @@ END:VCALENDAR` // Need a line break
return
}
func makeCalDavTimeFromTimeStamp(ts time.Time) (caldavtime string) {
return ts.In(config.GetTimeZone()).Format(DateFormat)
func ParseAlarms(alarms []Alarm, taskDescription string) (caldavalarms string) {
for _, a := range alarms {
if a.Description == "" {
a.Description = taskDescription
}
caldavalarms += `
BEGIN:VALARM`
switch a.RelativeTo {
case models.ReminderRelationStartDate:
caldavalarms += `
TRIGGER;RELATED=START:` + makeCalDavDuration(a.Duration)
case models.ReminderRelationEndDate, models.ReminderRelationDueDate:
caldavalarms += `
TRIGGER;RELATED=END:` + makeCalDavDuration(a.Duration)
default:
caldavalarms += `
TRIGGER;VALUE=DATE-TIME:` + makeCalDavTimeFromTimeStamp(a.Time)
}
caldavalarms += `
ACTION:DISPLAY
DESCRIPTION:` + a.Description + `
END:VALARM`
}
return caldavalarms
}
func calcAlarmDateFromReminder(eventStart, reminder time.Time) (alarmTime string) {
diff := reminder.Sub(eventStart)
diffStr := strings.ToUpper(diff.String())
if diff < 0 {
alarmTime += `-`
// We append the - at the beginning of the caldav flag, that would get in the way if the minutes
// themselves are also containing it
diffStr = diffStr[1:]
func makeCalDavTimeFromTimeStamp(ts time.Time) (caldavtime string) {
return ts.In(time.UTC).Format(DateFormat) + "Z"
}
func makeCalDavDuration(duration time.Duration) (caldavtime string) {
if duration < 0 {
duration = duration.Abs()
caldavtime = "-"
}
alarmTime += `PT` + diffStr
caldavtime += "PT" + strings.ToUpper(duration.Truncate(time.Millisecond).String())
return
}

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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
@ -20,279 +20,12 @@ import (
"testing"
"time"
"code.vikunja.io/api/pkg/models"
"code.vikunja.io/api/pkg/config"
"github.com/stretchr/testify/assert"
)
func TestParseEvents(t *testing.T) {
type args struct {
config *Config
events []*Event
}
tests := []struct {
name string
args args
wantCaldavevents string
}{
{
name: "Test caldavparsing without reminders",
args: args{
config: &Config{
Name: "test",
ProdID: "RandomProdID which is not random",
Color: "ffffff",
},
events: []*Event{
{
Summary: "Event #1",
Description: "Lorem Ipsum",
UID: "randommduid",
Timestamp: time.Unix(1543626724, 0).In(config.GetTimeZone()),
Start: time.Unix(1543626724, 0).In(config.GetTimeZone()),
End: time.Unix(1543627824, 0).In(config.GetTimeZone()),
Color: "affffe",
},
{
Summary: "Event #2",
UID: "randommduidd",
Timestamp: time.Unix(1543726724, 0).In(config.GetTimeZone()),
Start: time.Unix(1543726724, 0).In(config.GetTimeZone()),
End: time.Unix(1543738724, 0).In(config.GetTimeZone()),
},
{
Summary: "Event #3 with empty uid",
UID: "20181202T0600242aaef4a81d770c1e775e26bc5abebc87f1d3d7bffaa83",
Timestamp: time.Unix(1543726824, 0).In(config.GetTimeZone()),
Start: time.Unix(1543726824, 0).In(config.GetTimeZone()),
End: time.Unix(1543727000, 0).In(config.GetTimeZone()),
},
},
},
wantCaldavevents: `BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-PUBLISHED-TTL:PT4H
X-WR-CALNAME:test
PRODID:-//RandomProdID which is not random//EN
X-APPLE-CALENDAR-COLOR:#ffffffFF
X-OUTLOOK-COLOR:#ffffffFF
X-FUNAMBOL-COLOR:#ffffffFF
BEGIN:VEVENT
UID:randommduid
SUMMARY:Event #1
X-APPLE-CALENDAR-COLOR:#affffeFF
X-OUTLOOK-COLOR:#affffeFF
X-FUNAMBOL-COLOR:#affffeFF
DESCRIPTION:Lorem Ipsum
DTSTAMP:20181201T011204
DTSTART:20181201T011204
DTEND:20181201T013024
END:VEVENT
BEGIN:VEVENT
UID:randommduidd
SUMMARY:Event #2
DESCRIPTION:
DTSTAMP:20181202T045844
DTSTART:20181202T045844
DTEND:20181202T081844
END:VEVENT
BEGIN:VEVENT
UID:20181202T0600242aaef4a81d770c1e775e26bc5abebc87f1d3d7bffaa83
SUMMARY:Event #3 with empty uid
DESCRIPTION:
DTSTAMP:20181202T050024
DTSTART:20181202T050024
DTEND:20181202T050320
END:VEVENT
END:VCALENDAR`,
},
{
name: "Test caldavparsing with reminders",
args: args{
config: &Config{
Name: "test2",
ProdID: "RandomProdID which is not random",
},
events: []*Event{
{
Summary: "Event #1",
Description: "Lorem Ipsum",
UID: "randommduid",
Timestamp: time.Unix(1543626724, 0).In(config.GetTimeZone()),
Start: time.Unix(1543626724, 0).In(config.GetTimeZone()),
End: time.Unix(1543627824, 0).In(config.GetTimeZone()),
Alarms: []Alarm{
{Time: time.Unix(1543626524, 0).In(config.GetTimeZone())},
{Time: time.Unix(1543626224, 0).In(config.GetTimeZone())},
{Time: time.Unix(1543626024, 0)},
},
},
{
Summary: "Event #2",
UID: "randommduidd",
Timestamp: time.Unix(1543726724, 0).In(config.GetTimeZone()),
Start: time.Unix(1543726724, 0).In(config.GetTimeZone()),
End: time.Unix(1543738724, 0).In(config.GetTimeZone()),
Alarms: []Alarm{
{Time: time.Unix(1543626524, 0).In(config.GetTimeZone())},
{Time: time.Unix(1543626224, 0).In(config.GetTimeZone())},
{Time: time.Unix(1543626024, 0).In(config.GetTimeZone())},
},
},
{
Summary: "Event #3 with empty uid",
Timestamp: time.Unix(1543726824, 0).In(config.GetTimeZone()),
Start: time.Unix(1543726824, 0).In(config.GetTimeZone()),
End: time.Unix(1543727000, 0).In(config.GetTimeZone()),
Alarms: []Alarm{
{Time: time.Unix(1543626524, 0).In(config.GetTimeZone())},
{Time: time.Unix(1543626224, 0).In(config.GetTimeZone())},
{Time: time.Unix(1543626024, 0).In(config.GetTimeZone())},
{Time: time.Unix(1543826824, 0).In(config.GetTimeZone())},
},
},
{
Summary: "Event #4 without any",
Timestamp: time.Unix(1543726824, 0),
Start: time.Unix(1543726824, 0),
End: time.Unix(1543727000, 0),
},
},
},
wantCaldavevents: `BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-PUBLISHED-TTL:PT4H
X-WR-CALNAME:test2
PRODID:-//RandomProdID which is not random//EN
BEGIN:VEVENT
UID:randommduid
SUMMARY:Event #1
DESCRIPTION:Lorem Ipsum
DTSTAMP:20181201T011204
DTSTART:20181201T011204
DTEND:20181201T013024
BEGIN:VALARM
TRIGGER:-PT3M20S
ACTION:DISPLAY
DESCRIPTION:Event #1
END:VALARM
BEGIN:VALARM
TRIGGER:-PT8M20S
ACTION:DISPLAY
DESCRIPTION:Event #1
END:VALARM
BEGIN:VALARM
TRIGGER:-PT11M40S
ACTION:DISPLAY
DESCRIPTION:Event #1
END:VALARM
END:VEVENT
BEGIN:VEVENT
UID:randommduidd
SUMMARY:Event #2
DESCRIPTION:
DTSTAMP:20181202T045844
DTSTART:20181202T045844
DTEND:20181202T081844
BEGIN:VALARM
TRIGGER:-PT27H50M0S
ACTION:DISPLAY
DESCRIPTION:Event #2
END:VALARM
BEGIN:VALARM
TRIGGER:-PT27H55M0S
ACTION:DISPLAY
DESCRIPTION:Event #2
END:VALARM
BEGIN:VALARM
TRIGGER:-PT27H58M20S
ACTION:DISPLAY
DESCRIPTION:Event #2
END:VALARM
END:VEVENT
BEGIN:VEVENT
UID:20181202T0500242aaef4a81d770c1e775e26bc5abebc87f1d3d7bffaa83
SUMMARY:Event #3 with empty uid
DESCRIPTION:
DTSTAMP:20181202T050024
DTSTART:20181202T050024
DTEND:20181202T050320
BEGIN:VALARM
TRIGGER:-PT27H51M40S
ACTION:DISPLAY
DESCRIPTION:Event #3 with empty uid
END:VALARM
BEGIN:VALARM
TRIGGER:-PT27H56M40S
ACTION:DISPLAY
DESCRIPTION:Event #3 with empty uid
END:VALARM
BEGIN:VALARM
TRIGGER:-PT28H0M0S
ACTION:DISPLAY
DESCRIPTION:Event #3 with empty uid
END:VALARM
BEGIN:VALARM
TRIGGER:PT27H46M40S
ACTION:DISPLAY
DESCRIPTION:Event #3 with empty uid
END:VALARM
END:VEVENT
BEGIN:VEVENT
UID:20181202T050024ae7548ce9556df85038abe90dc674d4741a61ce74d1cf
SUMMARY:Event #4 without any
DESCRIPTION:
DTSTAMP:20181202T050024
DTSTART:20181202T050024
DTEND:20181202T050320
END:VEVENT
END:VCALENDAR`,
},
{
name: "Test caldavparsing with multiline description",
args: args{
config: &Config{
Name: "test",
ProdID: "RandomProdID which is not random",
},
events: []*Event{
{
Summary: "Event #1",
Description: `Lorem Ipsum
Dolor sit amet`,
UID: "randommduid",
Timestamp: time.Unix(1543626724, 0).In(config.GetTimeZone()),
Start: time.Unix(1543626724, 0).In(config.GetTimeZone()),
End: time.Unix(1543627824, 0).In(config.GetTimeZone()),
},
},
},
wantCaldavevents: `BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-PUBLISHED-TTL:PT4H
X-WR-CALNAME:test
PRODID:-//RandomProdID which is not random//EN
BEGIN:VEVENT
UID:randommduid
SUMMARY:Event #1
DESCRIPTION:Lorem Ipsum\nDolor sit amet
DTSTAMP:20181201T011204
DTSTART:20181201T011204
DTEND:20181201T013024
END:VEVENT
END:VCALENDAR`,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
gotCaldavevents := ParseEvents(tt.args.config, tt.args.events)
assert.Equal(t, gotCaldavevents, tt.wantCaldavevents)
})
}
}
func TestParseTodos(t *testing.T) {
type args struct {
config *Config
@ -333,13 +66,13 @@ X-OUTLOOK-COLOR:#ffffffFF
X-FUNAMBOL-COLOR:#ffffffFF
BEGIN:VTODO
UID:randommduid
DTSTAMP:20181201T011204
DTSTAMP:20181201T011204Z
SUMMARY:Todo #1
X-APPLE-CALENDAR-COLOR:#affffeFF
X-OUTLOOK-COLOR:#affffeFF
X-FUNAMBOL-COLOR:#affffeFF
DESCRIPTION:Lorem Ipsum\nDolor sit amet
LAST-MODIFIED:00010101T000000
LAST-MODIFIED:00010101T000000Z
END:VTODO
END:VCALENDAR`,
},
@ -368,12 +101,12 @@ X-WR-CALNAME:test
PRODID:-//RandomProdID which is not random//EN
BEGIN:VTODO
UID:randommduid
DTSTAMP:20181201T011204
DTSTAMP:20181201T011204Z
SUMMARY:Todo #1
DESCRIPTION:Lorem Ipsum
COMPLETED:20181201T013024
COMPLETED:20181201T013024Z
STATUS:COMPLETED
LAST-MODIFIED:00010101T000000
LAST-MODIFIED:00010101T000000Z
END:VTODO
END:VCALENDAR`,
},
@ -402,11 +135,196 @@ X-WR-CALNAME:test
PRODID:-//RandomProdID which is not random//EN
BEGIN:VTODO
UID:randommduid
DTSTAMP:20181201T011204
DTSTAMP:20181201T011204Z
SUMMARY:Todo #1
DESCRIPTION:Lorem Ipsum
PRIORITY:9
LAST-MODIFIED:00010101T000000
LAST-MODIFIED:00010101T000000Z
END:VTODO
END:VCALENDAR`,
},
{
name: "with repeating monthly",
args: args{
config: &Config{
Name: "test",
ProdID: "RandomProdID which is not random",
},
todos: []*Todo{
{
Summary: "Todo #1",
Description: "Lorem Ipsum",
UID: "randommduid",
Timestamp: time.Unix(1543626724, 0).In(config.GetTimeZone()),
RepeatMode: models.TaskRepeatModeMonth,
DueDate: time.Unix(1543626724, 0).In(config.GetTimeZone()),
},
},
},
wantCaldavtasks: `BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-PUBLISHED-TTL:PT4H
X-WR-CALNAME:test
PRODID:-//RandomProdID which is not random//EN
BEGIN:VTODO
UID:randommduid
DTSTAMP:20181201T011204Z
SUMMARY:Todo #1
DESCRIPTION:Lorem Ipsum
DUE:20181201T011204Z
RRULE:FREQ=MONTHLY;BYMONTHDAY=01
LAST-MODIFIED:00010101T000000Z
END:VTODO
END:VCALENDAR`,
},
{
name: "with repeat mode default",
args: args{
config: &Config{
Name: "test",
ProdID: "RandomProdID which is not random",
},
todos: []*Todo{
{
Summary: "Todo #1",
Description: "Lorem Ipsum",
UID: "randommduid",
Timestamp: time.Unix(1543626724, 0).In(config.GetTimeZone()),
RepeatMode: models.TaskRepeatModeDefault,
DueDate: time.Unix(1543626724, 0).In(config.GetTimeZone()),
RepeatAfter: 435,
},
},
},
wantCaldavtasks: `BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-PUBLISHED-TTL:PT4H
X-WR-CALNAME:test
PRODID:-//RandomProdID which is not random//EN
BEGIN:VTODO
UID:randommduid
DTSTAMP:20181201T011204Z
SUMMARY:Todo #1
DESCRIPTION:Lorem Ipsum
DUE:20181201T011204Z
RRULE:FREQ=SECONDLY;INTERVAL=435
LAST-MODIFIED:00010101T000000Z
END:VTODO
END:VCALENDAR`,
},
{
name: "with categories",
args: args{
config: &Config{
Name: "test",
ProdID: "RandomProdID which is not random",
Color: "ffffff",
},
todos: []*Todo{
{
Summary: "Todo #1",
UID: "randommduid",
Timestamp: time.Unix(1543626724, 0).In(config.GetTimeZone()),
Color: "affffe",
Categories: []string{"label1", "label2"},
},
},
},
wantCaldavtasks: `BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-PUBLISHED-TTL:PT4H
X-WR-CALNAME:test
PRODID:-//RandomProdID which is not random//EN
X-APPLE-CALENDAR-COLOR:#ffffffFF
X-OUTLOOK-COLOR:#ffffffFF
X-FUNAMBOL-COLOR:#ffffffFF
BEGIN:VTODO
UID:randommduid
DTSTAMP:20181201T011204Z
SUMMARY:Todo #1
X-APPLE-CALENDAR-COLOR:#affffeFF
X-OUTLOOK-COLOR:#affffeFF
X-FUNAMBOL-COLOR:#affffeFF
CATEGORIES:label1,label2
LAST-MODIFIED:00010101T000000Z
END:VTODO
END:VCALENDAR`,
},
{
name: "with alarm",
args: args{
config: &Config{
Name: "test",
ProdID: "RandomProdID which is not random",
},
todos: []*Todo{
{
Summary: "Todo #1",
UID: "randommduid",
Timestamp: time.Unix(1543626724, 0).In(config.GetTimeZone()),
Alarms: []Alarm{
{
Time: time.Unix(1543626724, 0).In(config.GetTimeZone()),
},
{
Time: time.Unix(1543626724, 0).In(config.GetTimeZone()),
Description: "alarm description",
},
{
Duration: -2 * time.Hour,
RelativeTo: "due_date",
},
{
Duration: 1 * time.Hour,
RelativeTo: "start_date",
},
{
Duration: time.Duration(0),
RelativeTo: "end_date",
},
},
},
},
},
wantCaldavtasks: `BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-PUBLISHED-TTL:PT4H
X-WR-CALNAME:test
PRODID:-//RandomProdID which is not random//EN
BEGIN:VTODO
UID:randommduid
DTSTAMP:20181201T011204Z
SUMMARY:Todo #1
LAST-MODIFIED:00010101T000000Z
BEGIN:VALARM
TRIGGER;VALUE=DATE-TIME:20181201T011204Z
ACTION:DISPLAY
DESCRIPTION:Todo #1
END:VALARM
BEGIN:VALARM
TRIGGER;VALUE=DATE-TIME:20181201T011204Z
ACTION:DISPLAY
DESCRIPTION:alarm description
END:VALARM
BEGIN:VALARM
TRIGGER;RELATED=END:-PT2H0M0S
ACTION:DISPLAY
DESCRIPTION:Todo #1
END:VALARM
BEGIN:VALARM
TRIGGER;RELATED=START:PT1H0M0S
ACTION:DISPLAY
DESCRIPTION:Todo #1
END:VALARM
BEGIN:VALARM
TRIGGER;RELATED=END:PT0S
ACTION:DISPLAY
DESCRIPTION:Todo #1
END:VALARM
END:VTODO
END:VCALENDAR`,
},
@ -414,7 +332,7 @@ END:VCALENDAR`,
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
gotCaldavtasks := ParseTodos(tt.args.config, tt.args.todos)
assert.Equal(t, gotCaldavtasks, tt.wantCaldavtasks)
assert.Equal(t, tt.wantCaldavtasks, gotCaldavtasks)
})
}
}

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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
@ -17,23 +17,38 @@
package caldav
import (
"errors"
"strconv"
"strings"
"time"
"code.vikunja.io/api/pkg/config"
"code.vikunja.io/api/pkg/log"
"code.vikunja.io/api/pkg/models"
"code.vikunja.io/api/pkg/utils"
ics "github.com/arran4/golang-ical"
)
func GetCaldavTodosForTasks(list *models.ListWithTasksAndBuckets, listTasks []*models.TaskWithComments) string {
func GetCaldavTodosForTasks(project *models.ProjectWithTasksAndBuckets, projectTasks []*models.TaskWithComments) string {
// Make caldav todos from Vikunja todos
var caldavtodos []*Todo
for _, t := range listTasks {
for _, t := range projectTasks {
duration := t.EndDate.Sub(t.StartDate)
var categories []string
for _, label := range t.Labels {
categories = append(categories, label.Title)
}
var alarms []Alarm
for _, reminder := range t.Reminders {
alarms = append(alarms, Alarm{
Time: reminder.Reminder,
Duration: time.Duration(reminder.RelativePeriod) * time.Second,
RelativeTo: reminder.RelativeTo,
})
}
caldavtodos = append(caldavtodos, &Todo{
Timestamp: t.Updated,
@ -42,18 +57,22 @@ func GetCaldavTodosForTasks(list *models.ListWithTasksAndBuckets, listTasks []*m
Description: t.Description,
Completed: t.DoneAt,
// Organizer: &t.CreatedBy, // Disabled until we figure out how this works
Priority: t.Priority,
Start: t.StartDate,
End: t.EndDate,
Created: t.Created,
Updated: t.Updated,
DueDate: t.DueDate,
Duration: duration,
Categories: categories,
Priority: t.Priority,
Start: t.StartDate,
End: t.EndDate,
Created: t.Created,
Updated: t.Updated,
DueDate: t.DueDate,
Duration: duration,
RepeatAfter: t.RepeatAfter,
RepeatMode: t.RepeatMode,
Alarms: alarms,
})
}
caldavConfig := &Config{
Name: list.Title,
Name: project.Title,
ProdID: "Vikunja Todo App",
}
@ -65,17 +84,20 @@ func ParseTaskFromVTODO(content string) (vTask *models.Task, err error) {
if err != nil {
return nil, err
}
// We put the task details in a map to be able to handle them more easily
task := make(map[string]string)
for _, c := range parsed.Components[0].UnknownPropertiesIANAProperties() {
task[c.IANAToken] = c.Value
vTodo, ok := parsed.Components[0].(*ics.VTodo)
if !ok {
return nil, errors.New("VTODO element not found")
}
// We put the vTodo details in a map to be able to handle them more easily
task := make(map[string]ics.IANAProperty)
for _, c := range vTodo.UnknownPropertiesIANAProperties() {
task[c.IANAToken] = c
}
// Parse the priority
var priority int64
if _, ok := task["PRIORITY"]; ok {
priorityParsed, err := strconv.ParseInt(task["PRIORITY"], 10, 64)
priorityParsed, err := strconv.ParseInt(task["PRIORITY"].Value, 10, 64)
if err != nil {
return nil, err
}
@ -84,23 +106,35 @@ func ParseTaskFromVTODO(content string) (vTask *models.Task, err error) {
}
// Parse the enddate
duration, _ := time.ParseDuration(task["DURATION"])
duration, _ := time.ParseDuration(task["DURATION"].Value)
description := strings.ReplaceAll(task["DESCRIPTION"], "\\,", ",")
description := strings.ReplaceAll(task["DESCRIPTION"].Value, "\\,", ",")
description = strings.ReplaceAll(description, "\\n", "\n")
var labels []*models.Label
if val, ok := task["CATEGORIES"]; ok {
categories := strings.Split(val.Value, ",")
labels = make([]*models.Label, 0, len(categories))
for _, category := range categories {
labels = append(labels, &models.Label{
Title: category,
})
}
}
vTask = &models.Task{
UID: task["UID"],
Title: task["SUMMARY"],
UID: task["UID"].Value,
Title: task["SUMMARY"].Value,
Description: description,
Priority: priority,
Labels: labels,
DueDate: caldavTimeToTimestamp(task["DUE"]),
Updated: caldavTimeToTimestamp(task["DTSTAMP"]),
StartDate: caldavTimeToTimestamp(task["DTSTART"]),
DoneAt: caldavTimeToTimestamp(task["COMPLETED"]),
}
if task["STATUS"] == "COMPLETED" {
if task["STATUS"].Value == "COMPLETED" {
vTask.Done = true
}
@ -108,11 +142,66 @@ func ParseTaskFromVTODO(content string) (vTask *models.Task, err error) {
vTask.EndDate = vTask.StartDate.Add(duration)
}
for _, vAlarm := range vTodo.SubComponents() {
if vAlarm, ok := vAlarm.(*ics.VAlarm); ok {
vTask = parseVAlarm(vAlarm, vTask)
}
}
return
}
func parseVAlarm(vAlarm *ics.VAlarm, vTask *models.Task) *models.Task {
for _, property := range vAlarm.UnknownPropertiesIANAProperties() {
if property.IANAToken != "TRIGGER" {
continue
}
if contains(property.ICalParameters["VALUE"], "DATE-TIME") {
// Example: TRIGGER;VALUE=DATE-TIME:20181201T011210Z
vTask.Reminders = append(vTask.Reminders, &models.TaskReminder{
Reminder: caldavTimeToTimestamp(property),
})
continue
}
duration := utils.ParseISO8601Duration(property.Value)
if contains(property.ICalParameters["RELATED"], "END") {
// Example: TRIGGER;RELATED=END:-P2D
if vTask.EndDate.IsZero() {
vTask.Reminders = append(vTask.Reminders, &models.TaskReminder{
RelativePeriod: int64(duration.Seconds()),
RelativeTo: models.ReminderRelationDueDate})
} else {
vTask.Reminders = append(vTask.Reminders, &models.TaskReminder{
RelativePeriod: int64(duration.Seconds()),
RelativeTo: models.ReminderRelationEndDate})
}
continue
}
// Example: TRIGGER;RELATED=START:-P2D
// Example: TRIGGER:-PT60M
vTask.Reminders = append(vTask.Reminders, &models.TaskReminder{
RelativePeriod: int64(duration.Seconds()),
RelativeTo: models.ReminderRelationStartDate})
}
return vTask
}
func contains(array []string, str string) bool {
for _, value := range array {
if value == str {
return true
}
}
return false
}
// https://tools.ietf.org/html/rfc5545#section-3.3.5
func caldavTimeToTimestamp(tstring string) time.Time {
func caldavTimeToTimestamp(ianaProperty ics.IANAProperty) time.Time {
tstring := ianaProperty.Value
if tstring == "" {
return time.Time{}
}
@ -127,7 +216,24 @@ func caldavTimeToTimestamp(tstring string) time.Time {
format = `20060102`
}
t, err := time.Parse(format, tstring)
var t time.Time
var err error
tzParameter := ianaProperty.ICalParameters["TZID"]
if len(tzParameter) > 0 {
loc, err := time.LoadLocation(tzParameter[0])
if err != nil {
log.Warningf("Error while parsing caldav timezone %s: %s", tzParameter[0], err)
} else {
t, err = time.ParseInLocation(format, tstring, loc)
if err != nil {
log.Warningf("Error while parsing caldav time %s to TimeStamp: %s at location %s", tstring, loc, err)
} else {
t = t.In(config.GetTimeZone())
return t
}
}
}
t, err = time.Parse(format, tstring)
if err != nil {
log.Warningf("Error while parsing caldav time %s to TimeStamp: %s", tstring, err)
return time.Time{}

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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
@ -85,6 +85,210 @@ END:VCALENDAR`,
Updated: time.Unix(1543626724, 0).In(config.GetTimeZone()),
},
},
{
name: "With categories",
args: args{content: `BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-PUBLISHED-TTL:PT4H
X-WR-CALNAME:test
PRODID:-//RandomProdID which is not random//EN
BEGIN:VTODO
UID:randomuid
DTSTAMP:20181201T011204
SUMMARY:Todo #1
DESCRIPTION:Lorem Ipsum
CATEGORIES:cat1,cat2
LAST-MODIFIED:00010101T000000
END:VTODO
END:VCALENDAR`,
},
wantVTask: &models.Task{
Title: "Todo #1",
UID: "randomuid",
Description: "Lorem Ipsum",
Labels: []*models.Label{
{
Title: "cat1",
},
{
Title: "cat2",
},
},
Updated: time.Unix(1543626724, 0).In(config.GetTimeZone()),
},
},
{
name: "With alarm (time trigger)",
args: args{content: `BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-PUBLISHED-TTL:PT4H
X-WR-CALNAME:test
PRODID:-//RandomProdID which is not random//EN
BEGIN:VTODO
UID:randomuid
DTSTAMP:20181201T011204
SUMMARY:Todo #1
DESCRIPTION:Lorem Ipsum
BEGIN:VALARM
TRIGGER;VALUE=DATE-TIME:20181201T011210Z
ACTION:DISPLAY
END:VALARM
END:VTODO
END:VCALENDAR`,
},
wantVTask: &models.Task{
Title: "Todo #1",
UID: "randomuid",
Description: "Lorem Ipsum",
Reminders: []*models.TaskReminder{
{
Reminder: time.Date(2018, 12, 1, 1, 12, 10, 0, config.GetTimeZone()),
},
},
Updated: time.Unix(1543626724, 0).In(config.GetTimeZone()),
},
},
{
name: "With alarm (relative trigger)",
args: args{content: `BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-PUBLISHED-TTL:PT4H
X-WR-CALNAME:test
PRODID:-//RandomProdID which is not random//EN
BEGIN:VTODO
UID:randomuid
DTSTAMP:20181201T011204
SUMMARY:Todo #1
DESCRIPTION:Lorem Ipsum
DTSTART:20230228T170000Z
DUE:20230304T150000Z
BEGIN:VALARM
TRIGGER:PT0S
ACTION:DISPLAY
END:VALARM
BEGIN:VALARM
TRIGGER;VALUE=DURATION:-PT60M
ACTION:DISPLAY
END:VALARM
BEGIN:VALARM
TRIGGER:-PT61M
ACTION:DISPLAY
END:VALARM
BEGIN:VALARM
TRIGGER;RELATED=START:-P1D
ACTION:DISPLAY
END:VALARM
BEGIN:VALARM
TRIGGER;RELATED=END:-PT30M
ACTION:DISPLAY
END:VALARM
END:VTODO
END:VCALENDAR`,
},
wantVTask: &models.Task{
Title: "Todo #1",
UID: "randomuid",
Description: "Lorem Ipsum",
StartDate: time.Date(2023, 2, 28, 17, 0, 0, 0, config.GetTimeZone()),
DueDate: time.Date(2023, 3, 4, 15, 0, 0, 0, config.GetTimeZone()),
Reminders: []*models.TaskReminder{
{
RelativeTo: models.ReminderRelationStartDate,
RelativePeriod: 0,
},
{
RelativeTo: models.ReminderRelationStartDate,
RelativePeriod: -3600,
},
{
RelativeTo: models.ReminderRelationStartDate,
RelativePeriod: -3660,
},
{
RelativeTo: models.ReminderRelationStartDate,
RelativePeriod: -86400,
},
{
RelativeTo: models.ReminderRelationDueDate,
RelativePeriod: -1800,
},
},
Updated: time.Unix(1543626724, 0).In(config.GetTimeZone()),
},
},
{
name: "example task from tasks.org app",
args: args{content: `BEGIN:VCALENDAR
VERSION:2.0
PRODID:+//IDN tasks.org//android-130102//EN
BEGIN:VTODO
DTSTAMP:20230402T074158Z
UID:4290517349243274514
CREATED:20230402T060451Z
LAST-MODIFIED:20230402T074154Z
SUMMARY:Test with tasks.org
PRIORITY:9
CATEGORIES:Vikunja
X-APPLE-SORT-ORDER:697384109
DUE;TZID=Europe/Berlin:20230402T170001
DTSTART;TZID=Europe/Berlin:20230401T090000
BEGIN:VALARM
TRIGGER;RELATED=END:PT0S
ACTION:DISPLAY
DESCRIPTION:Default Tasks.org description
END:VALARM
BEGIN:VALARM
TRIGGER;VALUE=DATE-TIME:20230402T100000Z
ACTION:DISPLAY
DESCRIPTION:Default Tasks.org description
END:VALARM
END:VTODO
BEGIN:VTIMEZONE
TZID:Europe/Berlin
LAST-MODIFIED:20220816T024022Z
BEGIN:DAYLIGHT
TZNAME:CEST
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
DTSTART:19810329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:CET
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
DTSTART:19961027T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
END:VCALENDAR`,
},
wantVTask: &models.Task{
Updated: time.Date(2023, 4, 2, 7, 41, 58, 0, config.GetTimeZone()),
UID: "4290517349243274514",
Title: "Test with tasks.org",
Priority: 1,
Labels: []*models.Label{
{
Title: "Vikunja",
},
},
DueDate: time.Date(2023, 4, 2, 15, 0, 1, 0, config.GetTimeZone()),
StartDate: time.Date(2023, 4, 1, 7, 0, 0, 0, config.GetTimeZone()),
Reminders: []*models.TaskReminder{
{
RelativeTo: models.ReminderRelationDueDate,
RelativePeriod: 0,
},
{
Reminder: time.Date(2023, 4, 2, 10, 0, 0, 0, config.GetTimeZone()),
},
},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
@ -94,7 +298,108 @@ END:VCALENDAR`,
return
}
if diff, equal := messagediff.PrettyDiff(got, tt.wantVTask); !equal {
t.Errorf("ParseTaskFromVTODO() gotVTask = %v, want %v, diff = %s", got, tt.wantVTask, diff)
t.Errorf("ParseTaskFromVTODO()\n gotVTask = %v\n want %v\n diff = %s", got, tt.wantVTask, diff)
}
})
}
}
func TestGetCaldavTodosForTasks(t *testing.T) {
type args struct {
list *models.ProjectWithTasksAndBuckets
tasks []*models.TaskWithComments
}
tests := []struct {
name string
args args
wantCaldav string
}{
{
name: "Format single Task as CalDAV",
args: args{
list: &models.ProjectWithTasksAndBuckets{
Project: models.Project{
Title: "List title",
},
},
tasks: []*models.TaskWithComments{
{
Task: models.Task{
Title: "Task 1",
UID: "randomuid",
Description: "Description",
Priority: 3,
Created: time.Unix(1543626721, 0).In(config.GetTimeZone()),
DueDate: time.Unix(1543626722, 0).In(config.GetTimeZone()),
StartDate: time.Unix(1543626723, 0).In(config.GetTimeZone()),
EndDate: time.Unix(1543626724, 0).In(config.GetTimeZone()),
Updated: time.Unix(1543626725, 0).In(config.GetTimeZone()),
DoneAt: time.Unix(1543626726, 0).In(config.GetTimeZone()),
RepeatAfter: 86400,
Labels: []*models.Label{
{
ID: 1,
Title: "label1",
},
{
ID: 2,
Title: "label2",
},
},
Reminders: []*models.TaskReminder{
{
Reminder: time.Unix(1543626730, 0).In(config.GetTimeZone()),
},
{
Reminder: time.Unix(1543626731, 0).In(config.GetTimeZone()),
RelativePeriod: -3600,
RelativeTo: models.ReminderRelationDueDate,
},
},
},
},
},
},
wantCaldav: `BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-PUBLISHED-TTL:PT4H
X-WR-CALNAME:List title
PRODID:-//Vikunja Todo App//EN
BEGIN:VTODO
UID:randomuid
DTSTAMP:20181201T011205Z
SUMMARY:Task 1
DTSTART:20181201T011203Z
DTEND:20181201T011204Z
DESCRIPTION:Description
COMPLETED:20181201T011206Z
STATUS:COMPLETED
DUE:20181201T011202Z
CREATED:20181201T011201Z
PRIORITY:3
RRULE:FREQ=SECONDLY;INTERVAL=86400
CATEGORIES:label1,label2
LAST-MODIFIED:20181201T011205Z
BEGIN:VALARM
TRIGGER;VALUE=DATE-TIME:20181201T011210Z
ACTION:DISPLAY
DESCRIPTION:Task 1
END:VALARM
BEGIN:VALARM
TRIGGER;RELATED=END:-PT1H0M0S
ACTION:DISPLAY
DESCRIPTION:Task 1
END:VALARM
END:VTODO
END:VCALENDAR`,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := GetCaldavTodosForTasks(tt.args.list, tt.args.tasks)
if diff, equal := messagediff.PrettyDiff(got, tt.wantCaldav); !equal {
t.Errorf("GetCaldavTodosForTasks() gotVTask = %v, want %v, diff = %s", got, tt.wantCaldav, diff)
}
})
}

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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

58
pkg/cmd/index.go Normal file
View File

@ -0,0 +1,58 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-present 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 cmd
import (
"code.vikunja.io/api/pkg/config"
"code.vikunja.io/api/pkg/initialize"
"code.vikunja.io/api/pkg/log"
"code.vikunja.io/api/pkg/models"
"github.com/spf13/cobra"
)
func init() {
rootCmd.AddCommand(indexCmd)
}
var indexCmd = &cobra.Command{
Use: "index",
Short: "Reindex all of Vikunja's data into Typesense. This will remove any existing index.",
PreRun: func(cmd *cobra.Command, args []string) {
initialize.FullInit()
},
Run: func(cmd *cobra.Command, args []string) {
if !config.TypesenseEnabled.GetBool() {
log.Error("Typesense not enabled")
return
}
log.Infof("Indexing… This may take a while.")
err := models.CreateTypesenseCollections()
if err != nil {
log.Critical(err.Error())
return
}
err = models.ReindexAllTasks()
if err != nil {
log.Critical(err.Error())
return
}
log.Infof("Done!")
},
}

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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
@ -188,10 +188,10 @@ var userCreateCmd = &cobra.Command{
log.Fatalf("Error creating new user: %s", err)
}
err = models.CreateNewNamespaceForUser(s, newUser)
err = models.CreateNewProjectForUser(s, newUser)
if err != nil {
_ = s.Rollback()
log.Fatalf("Error creating new namespace for user: %s", err)
log.Fatalf("Error creating new project for user: %s", err)
}
if err := s.Commit(); err != nil {
@ -225,7 +225,7 @@ var userUpdateCmd = &cobra.Command{
u.AvatarProvider = userFlagAvatar
}
_, err := user.UpdateUser(s, u)
_, err := user.UpdateUser(s, u, false)
if err != nil {
_ = s.Rollback()
log.Fatalf("Error updating the user: %s", err)
@ -299,7 +299,7 @@ var userChangeEnabledCmd = &cobra.Command{
u.Status = user.StatusActive
}
}
_, err := user.UpdateUser(s, u)
_, err := user.UpdateUser(s, u, false)
if err != nil {
_ = s.Rollback()
log.Fatalf("Could not enable the user")

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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
@ -23,15 +23,14 @@ import (
"os/signal"
"time"
"code.vikunja.io/api/pkg/cron"
"code.vikunja.io/api/pkg/config"
"code.vikunja.io/api/pkg/cron"
"code.vikunja.io/api/pkg/initialize"
"code.vikunja.io/api/pkg/log"
"code.vikunja.io/api/pkg/routes"
"code.vikunja.io/api/pkg/swagger"
"code.vikunja.io/api/pkg/utils"
"code.vikunja.io/api/pkg/version"
"github.com/labstack/echo/v4"
"github.com/spf13/cobra"
)
@ -76,9 +75,6 @@ var webCmd = &cobra.Command{
// Version notification
log.Infof("Vikunja version %s", version.Version)
// Additional swagger information
swagger.SwaggerInfo.Version = version.Version
// Start the webserver
e := routes.NewEcho()
routes.RegisterRoutes(e)

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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
@ -87,9 +87,9 @@ const (
DatabaseSslRootCert Key = `database.sslrootcert`
DatabaseTLS Key = `database.tls`
CacheEnabled Key = `cache.enabled`
CacheType Key = `cache.type`
CacheMaxElementSize Key = `cache.maxelementsize`
TypesenseEnabled Key = `typesense.enabled`
TypesenseURL Key = `typesense.url`
TypesenseAPIKey Key = `typesense.apikey`
MailerEnabled Key = `mailer.enabled`
MailerHost Key = `mailer.host`
@ -118,6 +118,8 @@ const (
LogPath Key = `log.path`
LogEvents Key = `log.events`
LogEventsLevel Key = `log.eventslevel`
LogMail Key = `log.mail`
LogMailLevel Key = `log.maillevel`
RateLimitEnabled Key = `ratelimit.enabled`
RateLimitKind Key = `ratelimit.kind`
@ -128,10 +130,6 @@ const (
FilesBasePath Key = `files.basepath`
FilesMaxSize Key = `files.maxsize`
MigrationWunderlistEnable Key = `migration.wunderlist.enable`
MigrationWunderlistClientID Key = `migration.wunderlist.clientid`
MigrationWunderlistClientSecret Key = `migration.wunderlist.clientsecret`
MigrationWunderlistRedirectURL Key = `migration.wunderlist.redirecturl`
MigrationTodoistEnable Key = `migration.todoist.enable`
MigrationTodoistClientID Key = `migration.todoist.clientid`
MigrationTodoistClientSecret Key = `migration.todoist.clientsecret`
@ -168,7 +166,7 @@ const (
DefaultSettingsDiscoverableByName Key = `defaultsettings.discoverable_by_name`
DefaultSettingsDiscoverableByEmail Key = `defaultsettings.discoverable_by_email`
DefaultSettingsOverdueTaskRemindersEnabled Key = `defaultsettings.overdue_tasks_reminders_enabled`
DefaultSettingsDefaultListID Key = `defaultsettings.default_list_id`
DefaultSettingsDefaultProjectID Key = `defaultsettings.default_project_id`
DefaultSettingsWeekStart Key = `defaultsettings.week_start`
DefaultSettingsLanguage Key = `defaultsettings.language`
DefaultSettingsTimezone Key = `defaultsettings.timezone`
@ -323,10 +321,9 @@ func InitDefaultConfig() {
DatabaseSslRootCert.setDefault("")
DatabaseTLS.setDefault("false")
// Cacher
CacheEnabled.setDefault(false)
CacheType.setDefault("memory")
CacheMaxElementSize.setDefault(1000)
// Typesense
TypesenseEnabled.setDefault(false)
// Mailer
MailerEnabled.setDefault(false)
MailerHost.setDefault("")
@ -353,8 +350,10 @@ func InitDefaultConfig() {
LogHTTP.setDefault("stdout")
LogEcho.setDefault("off")
LogPath.setDefault(ServiceRootpath.GetString() + "/logs")
LogEvents.setDefault("stdout")
LogEvents.setDefault("off")
LogEventsLevel.setDefault("INFO")
LogMail.setDefault("off")
LogMailLevel.setDefault("INFO")
// Rate Limit
RateLimitEnabled.setDefault(false)
RateLimitKind.setDefault("user")
@ -369,13 +368,12 @@ func InitDefaultConfig() {
CorsOrigins.setDefault([]string{"*"})
CorsMaxAge.setDefault(0)
// Migration
MigrationWunderlistEnable.setDefault(false)
MigrationTodoistEnable.setDefault(false)
MigrationTrelloEnable.setDefault(false)
MigrationMicrosoftTodoEnable.setDefault(false)
// Avatar
AvatarGravaterExpiration.setDefault(3600)
// List Backgrounds
// Project Backgrounds
BackgroundsEnabled.setDefault(true)
BackgroundsUploadEnabled.setDefault(true)
BackgroundsUnsplashEnabled.setDefault(false)
@ -426,10 +424,6 @@ func InitConfig() {
log.Println("No config file found, using default or config from environment variables.")
}
if CacheType.GetString() == "keyvalue" {
CacheType.Set(KeyvalueType.GetString())
}
if RateLimitStore.GetString() == "keyvalue" {
RateLimitStore.Set(KeyvalueType.GetString())
}

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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
@ -17,7 +17,6 @@
package db
import (
"encoding/gob"
"fmt"
"net/url"
"os"
@ -27,9 +26,7 @@ import (
"code.vikunja.io/api/pkg/config"
"code.vikunja.io/api/pkg/log"
xrc "gitea.com/xorm/xorm-redis-cache"
"xorm.io/xorm"
"xorm.io/xorm/caches"
"xorm.io/xorm/names"
"xorm.io/xorm/schemas"
@ -85,38 +82,23 @@ func CreateDBEngine() (engine *xorm.Engine, err error) {
logger := log.NewXormLogger("")
engine.SetLogger(logger)
// Cache
// We have to initialize the cache here to avoid import cycles
if config.CacheEnabled.GetBool() {
switch config.CacheType.GetString() {
case "memory":
cacher := caches.NewLRUCacher(caches.NewMemoryStore(), config.CacheMaxElementSize.GetInt())
engine.SetDefaultCacher(cacher)
case "redis":
cacher := xrc.NewRedisCacher(config.RedisHost.GetString(), config.RedisPassword.GetString(), xrc.DEFAULT_EXPIRATION, engine.Logger())
engine.SetDefaultCacher(cacher)
default:
log.Info("Did not find a valid cache type. Caching disabled. Please refer to the docs for poosible cache types.")
}
}
x = engine
return
}
// RegisterTableStructsForCache registers tables in gob encoding for redis cache
func RegisterTableStructsForCache(val interface{}) {
gob.Register(val)
}
func initMysqlEngine() (engine *xorm.Engine, err error) {
// We're using utf8mb here instead of just utf8 because we want to use non-BMP characters.
// See https://stackoverflow.com/a/30074553/10924593 for more info.
host := fmt.Sprintf("tcp(%s)", config.DatabaseHost.GetString())
if config.DatabaseHost.GetString()[0] == '/' { // looks like a unix socket
host = fmt.Sprintf("unix(%s)", config.DatabaseHost.GetString())
}
connStr := fmt.Sprintf(
"%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&tls=%s",
"%s:%s@%s/%s?charset=utf8mb4&parseTime=true&tls=%s",
config.DatabaseUser.GetString(),
config.DatabasePassword.GetString(),
config.DatabaseHost.GetString(),
host,
config.DatabaseDatabase.GetString(),
config.DatabaseTLS.GetString())
engine, err = xorm.NewEngine("mysql", connStr)

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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
@ -18,6 +18,7 @@ package db
import (
"encoding/json"
"strings"
"code.vikunja.io/api/pkg/log"
@ -53,7 +54,35 @@ func Restore(table string, contents []map[string]interface{}) (err error) {
return err
}
meta, err := x.DBMetas()
if err != nil {
return err
}
var metaForCurrentTable *schemas.Table
for _, m := range meta {
if m.Name == table {
metaForCurrentTable = m
break
}
}
if metaForCurrentTable == nil {
log.Fatalf("Could not find table definition for table %s", table)
}
for _, content := range contents {
for colName, value := range content {
// Date fields might get restored as 0001-01-01 from null dates. This can have unintended side-effects like
// users being scheduled for deletion after a restore.
// To avoid this, we set these dates to nil so that they'll end up as null in the db.
col := metaForCurrentTable.GetColumn(colName)
strVal, is := value.(string)
if is && col.SQLType.IsTime() && (strVal == "" || strings.HasPrefix(strVal, "0001-")) {
content[colName] = nil
}
}
if _, err := x.Table(table).Insert(content); err != nil {
return err
}

View File

@ -0,0 +1,30 @@
- id: 1
title: 'test token 1'
token_salt: iC1Qbpf7H1
token_hash: a1813a558185d99f5197d2d549e4dd91292376aa00210229d70f77b57e165f6613fd12c1f790aa6493548cb9bceff33b45b4
token_last_eight: 75f29d2e
permissions: '{"tasks":["read_all","update"]}'
expires_at: 2099-01-01 00:00:00
owner_id: 1
created: 2023-09-01 07:00:00
# token in plaintext is tk_2eef46f40ebab3304919ab2e7e39993f75f29d2e
- id: 2
title: 'test token 2'
token_salt: EtwMsqDfOA
token_hash: 5c4d80c58947f21295064d473937709f1159ab09085eb59e38783da6032181069ec2e1d236486533b66999f9f4ac375b45f5
token_last_eight: 235008c8
permissions: '{"tasks":["read_all","update"]}'
expires_at: 2023-01-01 00:00:00
owner_id: 1
created: 2023-09-01 07:00:00
# token in plaintext is tk_a5e6f92ddbad68f49ee2c63e52174db0235008c8
- id: 3
title: 'test token 3'
token_salt: AHeetyp1aB
token_hash: da4b9c3aa72633274c37ab3419fbfbe4c5b79310b76027ac36f85e4c5ad0c2342a1d9e1c9b72ca07ec0a66ad2ee3505539af
token_last_eight: 0b8dcb7c
permissions: '{"tasks":["read_all","update"]}'
expires_at: 2099-01-01 00:00:00
owner_id: 2
created: 2023-09-01 07:00:00
# token in plaintext is tk_5e29ae2ae079781ff73b0a3e0fe4d75a0b8dcb7c

View File

@ -1,6 +1,6 @@
- id: 1
title: testbucket1
list_id: 1
project_id: 1
created_by_id: 1
limit: 9999999 # This bucket has a limit we will never exceed in the tests to make sure the logic allows for buckets with limits
position: 1
@ -8,7 +8,7 @@
updated: 2020-04-18 21:13:52
- id: 2
title: testbucket2
list_id: 1
project_id: 1
created_by_id: 1
limit: 3
position: 2
@ -16,15 +16,15 @@
updated: 2020-04-18 21:13:52
- id: 3
title: testbucket3
list_id: 1
project_id: 1
created_by_id: 1
is_done_bucket: 1
position: 3
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 4
title: testbucket4 - other list
list_id: 2
title: testbucket4 - other project
project_id: 2
created_by_id: 1
is_done_bucket: 1
created: 2020-04-18 21:13:52
@ -32,189 +32,207 @@
# The following are not or only partly owned by user 1
- id: 5
title: testbucket5
list_id: 20
project_id: 20
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 6
title: testbucket6
list_id: 6
project_id: 6
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 7
title: testbucket7
list_id: 7
project_id: 7
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 8
title: testbucket8
list_id: 8
project_id: 8
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 9
title: testbucket9
list_id: 9
project_id: 9
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 10
title: testbucket10
list_id: 10
project_id: 10
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 11
title: testbucket11
list_id: 11
project_id: 11
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 12
title: testbucket13
list_id: 12
project_id: 12
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 13
title: testbucket13
list_id: 13
project_id: 13
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 14
title: testbucket14
list_id: 14
project_id: 14
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 15
title: testbucket15
list_id: 15
project_id: 15
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 16
title: testbucket16
list_id: 16
project_id: 16
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 17
title: testbucket17
list_id: 17
project_id: 17
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 18
title: testbucket18
list_id: 5
project_id: 5
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 19
title: testbucket19
list_id: 21
project_id: 21
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 20
title: testbucket20
list_id: 22
project_id: 22
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 21
title: testbucket21
list_id: 3
project_id: 3
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
# Duplicate buckets to make deletion of one of them possible
- id: 22
title: testbucket22
list_id: 6
project_id: 6
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 23
title: testbucket23
list_id: 7
project_id: 7
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 24
title: testbucket24
list_id: 8
project_id: 8
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 25
title: testbucket25
list_id: 9
project_id: 9
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 26
title: testbucket26
list_id: 10
project_id: 10
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 27
title: testbucket27
list_id: 11
project_id: 11
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 28
title: testbucket28
list_id: 12
project_id: 12
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 29
title: testbucket29
list_id: 13
project_id: 13
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 30
title: testbucket30
list_id: 14
project_id: 14
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 31
title: testbucket31
list_id: 15
project_id: 15
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 32
title: testbucket32
list_id: 16
project_id: 16
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 33
title: testbucket33
list_id: 17
project_id: 17
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
# This bucket is the last one in its list
# This bucket is the last one in its project
- id: 34
title: testbucket34
list_id: 18
project_id: 18
created_by_id: 1
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 35
title: testbucket35
list_id: 23
project_id: 23
created_by_id: -2
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 36
title: testbucket36
project_id: 33
created_by_id: 6
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 37
title: testbucket37
project_id: 34
created_by_id: 6
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52
- id: 38
title: testbucket36
project_id: 36
created_by_id: 15
created: 2020-04-18 21:13:52
updated: 2020-04-18 21:13:52

View File

@ -10,9 +10,6 @@
- entity_id: 34
user_id: 13 # owner
kind: 1
- entity_id: 34
user_id: 1
kind: 1
- entity_id: 23
user_id: 12 # owner
kind: 2

View File

@ -14,3 +14,7 @@
task_id: 36
label_id: 4
created: 2018-12-01 15:13:12
- id: 5
task_id: 40
label_id: 4
created: 2018-12-01 15:13:12

View File

@ -1,6 +1,6 @@
- id: 1
hash: test
list_id: 1
project_id: 1
right: 0
sharing_type: 1
shared_by_id: 1
@ -8,7 +8,7 @@
updated: 2018-12-02 15:13:12
- id: 2
hash: test2
list_id: 2
project_id: 2
right: 1
sharing_type: 1
shared_by_id: 1
@ -16,7 +16,7 @@
updated: 2018-12-02 15:13:12
- id: 3
hash: test3
list_id: 3
project_id: 3
right: 2
sharing_type: 1
shared_by_id: 1
@ -24,7 +24,7 @@
updated: 2018-12-02 15:13:12
- id: 4
hash: testWithPassword
list_id: 1
project_id: 1
right: 0
password: '$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.' # 1234
sharing_type: 2

View File

@ -4,7 +4,6 @@
description: Lorem Ipsum
identifier: test1
owner_id: 1
namespace_id: 1
position: 3
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
@ -14,7 +13,6 @@
description: Lorem Ipsum
identifier: test2
owner_id: 3
namespace_id: 1
position: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
@ -24,7 +22,6 @@
description: Lorem Ipsum
identifier: test3
owner_id: 3
namespace_id: 2
position: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
@ -34,7 +31,6 @@
description: Lorem Ipsum
identifier: test4
owner_id: 3
namespace_id: 3
position: 4
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
@ -44,7 +40,6 @@
description: Lorem Ipsum
identifier: test5
owner_id: 5
namespace_id: 5
position: 5
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
@ -54,7 +49,6 @@
description: Lorem Ipsum
identifier: test6
owner_id: 6
namespace_id: 6
position: 6
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
@ -64,7 +58,6 @@
description: Lorem Ipsum
identifier: test7
owner_id: 6
namespace_id: 6
position: 7
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
@ -74,7 +67,6 @@
description: Lorem Ipsum
identifier: test8
owner_id: 6
namespace_id: 6
position: 8
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
@ -84,7 +76,6 @@
description: Lorem Ipsum
identifier: test9
owner_id: 6
namespace_id: 6
position: 9
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
@ -94,7 +85,6 @@
description: Lorem Ipsum
identifier: test10
owner_id: 6
namespace_id: 6
position: 10
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
@ -104,7 +94,6 @@
description: Lorem Ipsum
identifier: test11
owner_id: 6
namespace_id: 6
position: 11
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
@ -114,8 +103,8 @@
description: Lorem Ipsum
identifier: test12
owner_id: 6
namespace_id: 7
position: 12
parent_project_id: 27
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
@ -124,8 +113,8 @@
description: Lorem Ipsum
identifier: test13
owner_id: 6
namespace_id: 8
position: 13
parent_project_id: 28
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
@ -134,8 +123,8 @@
description: Lorem Ipsum
identifier: test14
owner_id: 6
namespace_id: 9
position: 14
parent_project_id: 29
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
@ -144,8 +133,8 @@
description: Lorem Ipsum
identifier: test15
owner_id: 6
namespace_id: 10
position: 15
parent_project_id: 32
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
@ -154,8 +143,8 @@
description: Lorem Ipsum
identifier: test16
owner_id: 6
namespace_id: 11
position: 16
parent_project_id: 33
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
@ -164,19 +153,18 @@
description: Lorem Ipsum
identifier: test17
owner_id: 6
namespace_id: 12
position: 17
parent_project_id: 34
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
# This list is owned by user 7, and several other users have access to it via different methods.
# It is used to test the listUsers method.
# This project is owned by user 7, and several other users have access to it via different methods.
# It is used to test the projectUsers method.
-
id: 18
title: Test18
description: Lorem Ipsum
identifier: test18
owner_id: 7
namespace_id: 13
position: 18
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
@ -186,29 +174,28 @@
description: Lorem Ipsum
identifier: test19
owner_id: 7
namespace_id: 14
position: 19
parent_project_id: 29
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
# User 1 does not have access to this list
# User 1 does not have access to this project
-
id: 20
title: Test20
description: Lorem Ipsum
identifier: test20
owner_id: 13
namespace_id: 15
position: 20
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
id: 21
title: Test21 archived through namespace
title: Test21 archived through parent list
description: Lorem Ipsum
identifier: test21
owner_id: 1
namespace_id: 16
position: 21
parent_project_id: 22
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
@ -217,7 +204,6 @@
description: Lorem Ipsum
identifier: test22
owner_id: 1
namespace_id: 1
is_archived: 1
position: 22
updated: 2018-12-02 15:13:12
@ -228,7 +214,6 @@
description: Lorem Ipsum
identifier: test23
owner_id: 12
namespace_id: 17
position: 23
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
@ -238,7 +223,104 @@
description: Lorem Ipsum
identifier: test6
owner_id: 6
namespace_id: 6
position: 7
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
id: 25
title: Test25
owner_id: 6
parent_project_id: 12
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
id: 26
title: Test26
owner_id: 6
parent_project_id: 25
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
id: 27
title: Test27
owner_id: 6
position: 2700
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
id: 28
title: Test28
owner_id: 6
position: 2800
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
id: 29
title: Test29
owner_id: 6
position: 2900
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
id: 30
title: Test30
owner_id: 6
position: 3000
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
id: 31
title: Test31
owner_id: 6
position: 3100
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
id: 32
title: Test32
owner_id: 6
position: 3200
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
id: 33
title: Test33
owner_id: 6
position: 3300
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
id: 34
title: Test34
owner_id: 6
position: 3400
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
id: 35
title: Test35 with background
description: Lorem Ipsum
identifier: test6
owner_id: 6
background_file_id: 1
position: 8
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
id: 36
title: Project 36 for Caldav tests
description: Lorem Ipsum
identifier: test36
owner_id: 15
position: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
id: 37
title: Project 37
description: Lorem Ipsum
identifier: test37
owner_id: 16
position: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12

View File

@ -3,28 +3,18 @@
entity_id: 2
user_id: 1
created: 2021-02-01 15:13:12
- id: 2
entity_type: 1 # Namespace
entity_id: 6
user_id: 6
created: 2021-02-01 15:13:12
- id: 3
entity_type: 2 # List
entity_id: 12 # belongs to namespace 7
entity_type: 2 # project
entity_id: 12 # belongs to parent project 7
user_id: 6
created: 2021-02-01 15:13:12
- id: 4
entity_type: 3 # Task
entity_id: 22 # belongs to list 13 which belongs to namespace 8
user_id: 6
created: 2021-02-01 15:13:12
- id: 5
entity_type: 1 # Namespace
entity_id: 8
entity_id: 22 # belongs to project 13
user_id: 6
created: 2021-02-01 15:13:12
- id: 6
entity_type: 2 # List
entity_type: 2 # project
entity_id: 13
user_id: 6
created: 2021-02-01 15:13:12
@ -33,3 +23,8 @@
entity_id: 26
user_id: 6
created: 2021-02-01 15:13:12
- id: 8
entity_type: 2 # Project
entity_id: 32
user_id: 6
created: 2021-02-01 15:13:12

View File

@ -6,7 +6,13 @@
task_id: 27
reminder: 2018-12-01 01:13:44
created: 2018-12-01 01:12:04
relative_to: 'start_date'
relative_period: -3600
- id: 3
task_id: 2
reminder: 2018-12-01 01:13:44
created: 2018-12-01 01:12:04
- id: 4
task_id: 40
reminder: 2023-03-04 15:00:00
created: 2018-12-01 01:12:04

View File

@ -3,7 +3,7 @@
description: 'Lorem Ipsum'
done: false
created_by_id: 1
list_id: 1
project_id: 1
index: 1
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
@ -13,7 +13,7 @@
title: 'task #2 done'
done: true
created_by_id: 1
list_id: 1
project_id: 1
index: 2
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
@ -23,7 +23,7 @@
title: 'task #3 high prio'
done: false
created_by_id: 1
list_id: 1
project_id: 1
index: 3
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
@ -33,7 +33,7 @@
title: 'task #4 low prio'
done: false
created_by_id: 1
list_id: 1
project_id: 1
index: 4
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
@ -43,7 +43,7 @@
title: 'task #5 higher due date'
done: false
created_by_id: 1
list_id: 1
project_id: 1
index: 5
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
@ -53,7 +53,7 @@
title: 'task #6 lower due date'
done: false
created_by_id: 1
list_id: 1
project_id: 1
index: 6
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
@ -63,7 +63,7 @@
title: 'task #7 with start date'
done: false
created_by_id: 1
list_id: 1
project_id: 1
index: 7
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
@ -73,7 +73,7 @@
title: 'task #8 with end date'
done: false
created_by_id: 1
list_id: 1
project_id: 1
index: 8
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
@ -83,7 +83,7 @@
title: 'task #9 with start and end date'
done: false
created_by_id: 1
list_id: 1
project_id: 1
index: 9
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
@ -94,7 +94,7 @@
title: 'task #10 basic'
done: false
created_by_id: 1
list_id: 1
project_id: 1
index: 10
bucket_id: 1
created: 2018-12-01 01:12:04
@ -103,7 +103,7 @@
title: 'task #11 basic'
done: false
created_by_id: 1
list_id: 1
project_id: 1
index: 11
bucket_id: 1
created: 2018-12-01 01:12:04
@ -112,25 +112,25 @@
title: 'task #12 basic'
done: false
created_by_id: 1
list_id: 1
project_id: 1
index: 12
bucket_id: 1
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
- id: 13
title: 'task #13 basic other list'
title: 'task #13 basic other project'
done: false
created_by_id: 1
list_id: 2
project_id: 2
index: 1
bucket_id: 4
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
- id: 14
title: 'task #14 basic other list'
title: 'task #14 basic other project'
done: false
created_by_id: 5
list_id: 5
project_id: 5
index: 1
bucket_id: 18
created: 2018-12-01 01:12:04
@ -139,7 +139,7 @@
title: 'task #15'
done: false
created_by_id: 6
list_id: 6
project_id: 6
index: 1
bucket_id: 6
created: 2018-12-01 01:12:04
@ -148,7 +148,7 @@
title: 'task #16'
done: false
created_by_id: 6
list_id: 7
project_id: 7
index: 1
bucket_id: 7
created: 2018-12-01 01:12:04
@ -157,7 +157,7 @@
title: 'task #17'
done: false
created_by_id: 6
list_id: 8
project_id: 8
index: 1
bucket_id: 8
created: 2018-12-01 01:12:04
@ -166,7 +166,7 @@
title: 'task #18'
done: false
created_by_id: 6
list_id: 9
project_id: 9
index: 1
bucket_id: 9
created: 2018-12-01 01:12:04
@ -175,7 +175,7 @@
title: 'task #19'
done: false
created_by_id: 6
list_id: 10
project_id: 10
index: 1
bucket_id: 10
created: 2018-12-01 01:12:04
@ -184,7 +184,7 @@
title: 'task #20'
done: false
created_by_id: 6
list_id: 11
project_id: 11
index: 1
bucket_id: 11
created: 2018-12-01 01:12:04
@ -193,7 +193,7 @@
title: 'task #21'
done: false
created_by_id: 6
list_id: 12
project_id: 32
index: 1
bucket_id: 12
created: 2018-12-01 01:12:04
@ -202,25 +202,25 @@
title: 'task #22'
done: false
created_by_id: 6
list_id: 13
project_id: 33
index: 1
bucket_id: 13
bucket_id: 36
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
- id: 23
title: 'task #23'
done: false
created_by_id: 6
list_id: 14
project_id: 34
index: 1
bucket_id: 14
bucket_id: 37
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
- id: 24
title: 'task #24'
done: false
created_by_id: 6
list_id: 15
project_id: 15
index: 1
bucket_id: 15
created: 2018-12-01 01:12:04
@ -229,7 +229,7 @@
title: 'task #25'
done: false
created_by_id: 6
list_id: 16
project_id: 16
index: 1
bucket_id: 16
created: 2018-12-01 01:12:04
@ -238,26 +238,27 @@
title: 'task #26'
done: false
created_by_id: 6
list_id: 17
project_id: 17
index: 1
bucket_id: 17
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
- id: 27
title: 'task #27 with reminders'
title: 'task #27 with reminders and start_date'
done: false
created_by_id: 1
list_id: 1
project_id: 1
index: 12
bucket_id: 1
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
start_date: 2018-11-30 22:25:24
- id: 28
title: 'task #28 with repeat after'
done: false
created_by_id: 1
repeat_after: 3600
list_id: 1
project_id: 1
index: 13
bucket_id: 1
created: 2018-12-01 01:12:04
@ -266,7 +267,7 @@
title: 'task #29 with parent task (1)'
done: false
created_by_id: 1
list_id: 1
project_id: 1
index: 14
bucket_id: 1
created: 2018-12-01 01:12:04
@ -275,7 +276,7 @@
title: 'task #30 with assignees'
done: false
created_by_id: 1
list_id: 1
project_id: 1
index: 15
bucket_id: 1
created: 2018-12-01 01:12:04
@ -284,7 +285,7 @@
title: 'task #31 with color'
done: false
created_by_id: 1
list_id: 1
project_id: 1
index: 16
hex_color: f0f0f0
bucket_id: 1
@ -294,7 +295,7 @@
title: 'task #32'
done: false
created_by_id: 1
list_id: 3
project_id: 3
index: 1
bucket_id: 21
created: 2018-12-01 01:12:04
@ -303,7 +304,7 @@
title: 'task #33 with percent done'
done: false
created_by_id: 1
list_id: 1
project_id: 1
index: 17
percent_done: 0.5
bucket_id: 1
@ -314,7 +315,7 @@
title: 'task #34'
done: false
created_by_id: 13
list_id: 20
project_id: 20
index: 20
bucket_id: 5
created: 2018-12-01 01:12:04
@ -323,7 +324,7 @@
title: 'task #35'
done: false
created_by_id: 1
list_id: 21
project_id: 21
index: 1
bucket_id: 19
created: 2018-12-01 01:12:04
@ -332,16 +333,17 @@
title: 'task #36'
done: false
created_by_id: 1
list_id: 22
project_id: 22
index: 1
bucket_id: 20
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
due_date: 2018-10-30 22:25:24
- id: 37
title: 'task #37'
done: false
created_by_id: -2
list_id: 2
project_id: 2
index: 2
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
@ -349,8 +351,28 @@
title: 'task #37 done with due date'
done: true
created_by_id: 1
list_id: 22
project_id: 22
index: 2
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
due_date: 2018-10-30 22:25:24
- id: 39
title: 'task #39'
created_by_id: 1
project_id: 25
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
- id: 40
uid: 'uid-caldav-test'
title: 'Title Caldav Test'
description: 'Description Caldav Test'
priority: 3
done: false
created_by_id: 15
project_id: 36
index: 39
due_date: 2023-03-01 15:00:00
created: 2018-12-01 01:12:04
updated: 2018-12-01 01:12:04
bucket_id: 1
position: 39

View File

@ -1,54 +0,0 @@
- id: 1
team_id: 1
list_id: 3
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
# This team has read only access on list 6
- id: 2
team_id: 2
list_id: 6
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
# This team has write access on list 7
- id: 3
team_id: 3
list_id: 7
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
# This team has admin access on list 8
- id: 4
team_id: 4
list_id: 8
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
# Readonly acces on list 19
- id: 5
team_id: 8
list_id: 19
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
# Write acces on list 19
- id: 6
team_id: 9
list_id: 19
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
# Admin acces on list 19
- id: 7
team_id: 10
list_id: 19
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 8
team_id: 1
list_id: 21
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12

View File

@ -1,52 +0,0 @@
- id: 1
team_id: 1
namespace_id: 3
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 2
team_id: 2
namespace_id: 3
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 3
team_id: 5
namespace_id: 7
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 4
team_id: 6
namespace_id: 8
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 5
team_id: 7
namespace_id: 9
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 6
team_id: 11
namespace_id: 14
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 7
team_id: 12
namespace_id: 14
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 8
team_id: 13
namespace_id: 14
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12

View File

@ -0,0 +1,96 @@
- id: 1
team_id: 1
project_id: 3
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
# This team has read only access on project 6
- id: 2
team_id: 2
project_id: 6
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
# This team has write access on project 7
- id: 3
team_id: 3
project_id: 7
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
# This team has admin access on project 8
- id: 4
team_id: 4
project_id: 8
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
# Readonly acces on project 19
- id: 5
team_id: 8
project_id: 19
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
# Write acces on project 19
- id: 6
team_id: 9
project_id: 19
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
# Admin acces on project 19
- id: 7
team_id: 10
project_id: 19
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 8
team_id: 1
project_id: 21
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 9
team_id: 1
project_id: 28
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 10
team_id: 11
project_id: 29
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 11
team_id: 12
project_id: 29
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 12
team_id: 13
project_id: 29
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 13
team_id: 1
project_id: 32
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 14
team_id: 1
project_id: 33
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 15
team_id: 1
project_id: 34
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12

View File

@ -3,22 +3,13 @@
description: Lorem Ipsum
created_by_id: 1
- id: 2
name: testteam2_read_only_on_list6
name: testteam2_read_only_on_project6
created_by_id: 1
- id: 3
name: testteam3_write_on_list7
name: testteam3_write_on_project7
created_by_id: 1
- id: 4
name: testteam4_admin_on_list8
created_by_id: 1
- id: 5
name: testteam2_read_only_on_namespace7
created_by_id: 1
- id: 6
name: testteam3_write_on_namespace8
created_by_id: 1
- id: 7
name: testteam4_admin_on_namespace9
name: testteam4_admin_on_project8
created_by_id: 1
- id: 8
name: testteam8

View File

@ -12,6 +12,7 @@
password: '$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.' # 1234
email: 'user2@example.com'
issuer: local
default_project_id: 4
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
@ -20,6 +21,7 @@
password: '$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.' # 1234
email: 'user3@example.com'
issuer: local
default_project_id: 4
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
-
@ -40,7 +42,7 @@
issuer: local
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
# This use is used to create a whole bunch of lists which are then shared directly with a user
# This use is used to create a whole bunch of projects which are then shared directly with a user
- id: 6
username: 'user6'
password: '$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.' # 1234
@ -109,3 +111,18 @@
subject: '12345'
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 15
username: 'user15'
password: '$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.' # 1234
email: 'user15@example.com'
issuer: local
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 16
username: 'user16'
password: '$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.' # 1234
email: 'user16@example.com'
issuer: local
default_project_id: 37
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12

View File

@ -1,48 +0,0 @@
- id: 1
user_id: 1
list_id: 3
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 2
user_id: 2
list_id: 3
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 3
user_id: 1
list_id: 9
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 4
user_id: 1
list_id: 10
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 5
user_id: 1
list_id: 11
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 6
user_id: 4
list_id: 19
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 7
user_id: 5
list_id: 19
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 8
user_id: 6
list_id: 19
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12

View File

@ -1,52 +0,0 @@
- id: 1
user_id: 1
namespace_id: 3
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 2
user_id: 2
namespace_id: 3
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 3
user_id: 1
namespace_id: 10
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 4
user_id: 1
namespace_id: 11
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 5
user_id: 1
namespace_id: 12
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 6
user_id: 11
namespace_id: 14
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 7
user_id: 12
namespace_id: 14
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 8
user_id: 13
namespace_id: 14
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12

View File

@ -1,90 +1,102 @@
- id: 1
title: testnamespace
description: Lorem Ipsum
owner_id: 1
user_id: 1
project_id: 3
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 2
title: testnamespace2
description: Lorem Ipsum
owner_id: 2
user_id: 2
project_id: 3
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 3
title: testnamespace3
description: Lorem Ipsum
owner_id: 3
user_id: 1
project_id: 9
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 4
user_id: 1
project_id: 10
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 5
user_id: 1
project_id: 11
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 6
title: testnamespace6
description: Lorem Ipsum
owner_id: 6
user_id: 4
project_id: 19
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 7
title: testnamespace7
description: Lorem Ipsum
owner_id: 6
user_id: 5
project_id: 19
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 8
title: testnamespace8
description: Lorem Ipsum
owner_id: 6
user_id: 6
project_id: 19
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 9
title: testnamespace9
description: Lorem Ipsum
owner_id: 6
user_id: 1
project_id: 27
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 10
title: testnamespace10
description: Lorem Ipsum
owner_id: 6
user_id: 11
project_id: 29
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 11
title: testnamespace11
description: Lorem Ipsum
owner_id: 6
user_id: 12
project_id: 29
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 12
title: testnamespace12
description: Lorem Ipsum
owner_id: 6
user_id: 13
project_id: 29
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 13
title: testnamespace13
description: Lorem Ipsum
owner_id: 7
user_id: 1
project_id: 30
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 14
title: testnamespace14
description: Lorem Ipsum
owner_id: 7
user_id: 1
project_id: 31
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 15
title: testnamespace15
description: Lorem Ipsum
owner_id: 13
user_id: 1
project_id: 28
right: 1
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 16
title: Archived testnamespace16
owner_id: 1
is_archived: 1
user_id: 1
project_id: 29
right: 2
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12
- id: 17
title: testnamespace17
description: Lorem Ipsum
owner_id: 12
user_id: 15
project_id: 26
right: 0
updated: 2018-12-02 15:13:12
created: 2018-12-01 15:13:12

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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
@ -22,7 +22,7 @@ import (
)
// ILIKE returns an ILIKE query on postgres and a LIKE query on all other platforms.
// Postgres' is case sensitive by default.
// Postgres' is case-sensitive by default.
// To work around this, we're using ILIKE as opposed to normal LIKE statements.
// ILIKE is preferred over LOWER(text) LIKE for performance reasons.
// See https://stackoverflow.com/q/7005302/10924593

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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
@ -17,6 +17,7 @@
package db
import (
"encoding/json"
"fmt"
"os"
"testing"
@ -25,6 +26,7 @@ import (
"code.vikunja.io/api/pkg/log"
"github.com/stretchr/testify/assert"
"xorm.io/builder"
"xorm.io/xorm"
"xorm.io/xorm/names"
)
@ -92,7 +94,16 @@ func AssertExists(t *testing.T, table string, values map[string]interface{}, cus
exists, err = x.Table(table).Where(values).Get(&v)
}
assert.NoError(t, err, fmt.Sprintf("Failed to assert entries exist in db, error was: %s", err))
assert.True(t, exists, fmt.Sprintf("Entries %v do not exist in table %s", values, table))
if !exists {
all := []map[string]interface{}{}
err = x.Table(table).Find(&all)
assert.NoError(t, err, fmt.Sprintf("Failed to assert entries exist in db, error was: %s", err))
pretty, err := json.MarshalIndent(all, "", " ")
assert.NoError(t, err, fmt.Sprintf("Failed to assert entries exist in db, error was: %s", err))
t.Errorf(fmt.Sprintf("Entries %v do not exist in table %s\n\nFound entries instead: %v", values, table, string(pretty)))
}
}
// AssertMissing checks and asserts the nonexiste nce of certain entries in the db
@ -102,3 +113,10 @@ func AssertMissing(t *testing.T, table string, values map[string]interface{}) {
assert.NoError(t, err, fmt.Sprintf("Failed to assert entries don't exist in db, error was: %s", err))
assert.False(t, exists, fmt.Sprintf("Entries %v exist in table %s", values, table))
}
// AssertCount checks if a number of entries exists in the database
func AssertCount(t *testing.T, table string, where builder.Cond, count int64) {
dbCount, err := x.Table(table).Where(where).Count()
assert.NoError(t, err, fmt.Sprintf("Failed to assert count in db, error was: %s", err))
assert.Equal(t, count, dbCount, fmt.Sprintf("Found %d entries instead of expected %d in table %s", dbCount, count, table))
}

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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

View File

@ -1,5 +1,5 @@
// Vikunja is a to-do list application to facilitate your life.
// Copyright 2018-2021 Vikunja and contributors. All rights reserved.
// Copyright 2018-present 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

Some files were not shown because too many files have changed in this diff Show More