Commit Graph

1183 Commits

Author SHA1 Message Date
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
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
359d0512cc
fix: upgrade jwt v5 2023-05-23 16:37:16 +02:00
7d9e8bd150
fix(cli): rename user project command 2023-05-10 22:37:37 +02: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
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
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
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
47e42238ef
fix: make sure Vikunja is buildable without swagger docs present 2023-04-06 12:11:31 +02: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
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
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
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
efa24cec44
feat: generate swagger docs at build time 2023-04-02 16:52:54 +02: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
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
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
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
4d5ad8f50e
chore(deps): update golangci-lint to 1.52.1 2023-03-24 19:17:45 +01:00
6aadaaaffc chore: rename files (fix typo) 2023-03-21 19:02:05 +00:00
8916de0366
fix: update redoc 2023-03-16 19:08:18 +01: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
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
9f14466dfa
fix: lint 2023-03-05 22:24:29 +01: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
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
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
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
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
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
20a5994b17
fix: lint 2023-02-14 20:37:16 +01: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
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
fdbe110945
chore(deps): upgrade golangci-lint to 1.51.0 2023-02-02 11:16:07 +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
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
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
40411e4100
chore(task): add test to check if a task's reminders are duplicated 2023-01-26 16:06:49 +01:00
682123a9c9
fix(migration): todoist pagination now avoids too many loops 2023-01-24 22:27:57 +01:00
c59e006453
fix(migration): remove unused todoist parameters 2023-01-24 18:44:33 +01: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
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
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
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
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
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
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
f93317bf5d
fix(caldav): add Z suffix to dates make it clear dates are in UTC 2022-12-04 21:01:04 +01:00
b8c3b570a4
fix(restore): check if we're really dealing with a string 2022-12-02 14:49:32 +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
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
96b5e93379
fix: swagger docs 2022-11-11 15:34:26 +01:00
33e27c66a0
fix(filters): try parsing invalid dates like 2022-11-1 2022-11-11 11:05:21 +01:00
986129a784
fix(filters): try parsing dates without time 2022-11-11 10:54:50 +01:00
3d7605591e
fix(filters): try to parse date filter fields of the provided dates are not valid iso dates
Resolves https://community.vikunja.io/t/due-date-saved-filter-doesnt-seem-to-work/966/12
2022-11-10 16:39:44 +01:00
811514855b
fix(metrics): make currently active users actually work 2022-11-09 21:12:17 +01:00
a9e6776abf
fix(tasks): allow sorting by task index 2022-11-09 14:43:31 +01:00
f9b48ec091
fix(filter): only check for 0 values in filter fields with numeric values 2022-11-08 17:03:07 +01:00
3b0b4a8460
fix(task): duplicate reminders when adding different ones between winter / summer time
Resolves F-889
2022-11-08 16:50:19 +01:00
2ef5e54588
fix(filter): also check for 0 values if the filter should include nulls
Resolves https://community.vikunja.io/t/due-date-saved-filter-doesnt-seem-to-work/966
2022-11-08 16:27:16 +01:00
641a9da93d fix: usage with postgres over unix socket (#1308)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1308
2022-11-04 12:25:06 +00:00
622f2f0562
fix: look for the default bucket based on the position instead of the index 2022-11-03 15:10:20 +01:00
c495096444
fix: make sure task indexes are calculated correctly when moving tasks between lists
Resolves https://github.com/go-vikunja/api/issues/52
2022-11-02 17:40:52 +01:00
9fc08a0790
fix(lists): return correct max right for lists where the user has created the namespace 2022-10-25 18:54:11 +02:00
f5a33478f2
fix(migration): make sure importing works when the csv file has errors and don't try to parse empty values as dates 2022-10-09 22:58:08 +02:00
0d044997df
fix(migration): expose ticktick migrator to /info 2022-10-09 22:45:01 +02:00
5e40f4ec89
fix(migration): properly parse duration 2022-10-09 22:44:57 +02:00
5871d32c2d
feat(migration): generate swagger docs 2022-10-09 22:44:54 +02:00
3af9855148
feat(migration): add routes for TickTick migrator 2022-10-09 22:44:49 +02:00
e5394d6d4b
feat(migration): add TickTick migrator 2022-10-09 22:44:32 +02:00
b8769c746c
feat: allow a user to remove themselves from a team 2022-10-09 16:39:40 +02:00
2fc690a783
fix: make sure list subscriptions are set correctly when their namespace has a subscription already 2022-10-07 14:18:36 +02:00
008908eb49
fix: make sure a user can only be assigned once to a task
See https://community.vikunja.io/t/task-can-be-assigned-twice-or-more-to-the-same-user/883
2022-10-06 18:22:19 +02:00
631a265d2d
feat: add proper checks and errors to see if an attachment belongs to the task it's being used as cover image in 2022-10-05 15:12:29 +02:00
e113fe34d0
chore: generate swagger docs 2022-10-05 15:12:29 +02:00
0eb47096db
fix: make cover image id actually updatable 2022-10-05 15:12:29 +02:00
0e1904d50b
fix: make cover image id actually updatable 2022-10-05 15:12:29 +02:00
b4b25499f2
feat(task): add cover image attachment id property 2022-10-05 15:12:29 +02:00
5a40100ac5
feat: provide default user settings for new users via config 2022-10-02 11:00:58 +02:00
aed560339b
fix(todoist): properly import all done tasks 2022-10-01 19:29:05 +02:00
c076f73a87
fix: make sure user searches are always case-insensitive
See vikunja/frontend#2196 (comment)
Resolves https://github.com/go-vikunja/frontend/issues/29
2022-10-01 17:39:08 +02:00
53419180be feat: upgrade xorm (#1197)
Reviewed-on: vikunja/api#1197
2022-10-01 15:10:00 +00:00
c5bd09702a chore(deps): update dependency golang to v1.19 (#1228)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1228
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-10-01 15:05:12 +00:00
fcb205a842
fix: use connection string for postgres 2022-10-01 16:57:06 +02:00
b1fd13bbcb
feat: upgrade xorm 2022-10-01 16:25:29 +02:00
878d19beb8
fix: make sure pseudo namespaces and lists always have the current user as owner 2022-10-01 15:19:46 +02:00
96ed1e33e3
fix: don't allow setting a list namespace to 0
See https://github.com/go-vikunja/app/issues/13
2022-10-01 15:02:17 +02:00
45defebcf4
fix: tasks with the same assignee as doer should not appear twice in overdue task mails 2022-09-30 18:35:40 +02:00
3adfeb3b34 fix(namespaces): add list subscriptions (#1254)
Add list subscriptions to namespaces call to enable frontend to show subscription state correctly.

Resolves https://github.com/go-vikunja/frontend/issues/75

Reviewed-on: vikunja/api#1254
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Luca Bernstein <luca@lucabernstein.com>
Co-committed-by: Luca Bernstein <luca@lucabernstein.com>
2022-09-29 09:49:24 +00:00
54b7f7127c fix(caldav): no failed login emails for tokens (#1252)
Prevent Vikunja from sending mail notifications for failed login attempts if CalDav token is used.

Before, as the provided password value was tested against the user password regardless of whether it was a CalDav token, it triggered a failed login attempt email every three times.

Reviewed-on: vikunja/api#1252
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Luca Bernstein <luca@lucabernstein.com>
Co-committed-by: Luca Bernstein <luca@lucabernstein.com>
2022-09-27 15:12:37 +00:00
25609db567 fix(mail): pass mail server timeout (#1253)
Fix error log for mailserver closing logic, as default timeout of 15 seconds of mail client package used triggers before our logic leading to error on close.

Resolves https://github.com/go-vikunja/api/issues/48

Reviewed-on: vikunja/api#1253
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Luca Bernstein <luca@lucabernstein.com>
Co-committed-by: Luca Bernstein <luca@lucabernstein.com>
2022-09-26 16:09:39 +00:00
Arie
090c67138a
fix: preserve dates for repeating tasks (#47)
Reviewed-At: https://github.com/go-vikunja/api/pull/47
2022-09-16 17:20:08 +02:00
aaeffe925e
fix(caldav): make sure duration and due date follow rfc5545
Related discussion: https://community.vikunja.io/t/error-with-davx-synchronization/810
2022-09-07 15:39:40 +02:00
c19479757a
fix: properly log extra message 2022-09-01 14:19:00 +02:00
beb4d07cf9
fix: don't override saved filters 2022-08-17 17:03:01 +02:00
10ded56f66
fix: don't fail a migration if there is no filter saved 2022-08-17 12:27:03 +02:00
0c8bed4054 fix: lint 2022-08-16 21:27:32 +00:00
9ddd7f4889 fix: only list all users when allowed 2022-08-16 21:27:32 +00:00
3047ccfd4a feat: add migration to change user ids to usernames in saved filters 2022-08-16 21:27:32 +00:00
7f28865903 feat: search by assignee username instead of id 2022-08-16 21:27:32 +00:00
8bf0f8bb57
fix: make sure generating blur hashes for bmp, tiff and webp images works 2022-08-15 23:37:05 +02:00
3ccc6365a6
fix: prevent moving a list into a pseudo namespace 2022-08-15 23:25:39 +02:00
d47edac376
feat(mail): don't try to authenticate when no username and password was provided 2022-08-03 13:41:42 +02:00
77fafd5dc3
fix: lint 2022-08-02 15:07:08 +02:00
3688bbde20
fix: don't return email addresses from user search results 2022-08-02 15:02:15 +02:00
c51ee94ad1
fix: return all users on a list when no search param was provided 2022-08-02 15:02:00 +02:00
8f27e7e619
fix: properly decode params in url
Resolves vikunja/api#1224
2022-08-02 14:50:03 +02:00
382a7884be
fix: make sure to use user discoverability settings when searching list users
Resolves vikunja/frontend#2196
2022-08-02 13:26:42 +02:00
1feb62cc45
fix: lint 2022-07-31 15:50:38 +02:00
dd461746a6
fix: add validation for negative repeat after values
Partial fix for vikunja/frontend#2179
2022-07-21 15:00:28 +02:00
0f555b7ec7
fix: reset id sequence when importing a dump from postgres 2022-07-21 14:54:52 +02:00
79b31673e2
fix: return 9:00 as default time for reminders if none was set
Resolves vikunja/api#1211
2022-07-19 16:38:48 +02:00
6e15d46a93
fix(restore): use the correct initial migration
Related to vikunja/api#1199
2022-07-13 23:44:21 +02:00
54348c5891
fix(restore): make sure to reset sequences after importing a dump when using postgres
Related to vikunja/api#1199
2022-07-13 23:43:53 +02:00
596d2bf676
fix(restore): properly decode notifications json data
Related to vikunja/api#1199
2022-07-13 23:43:20 +02:00
ac92499b7d
fix(caldav): make sure description is parsed correctly when multiline
Resolves https://github.com/go-vikunja/api/issues/35
2022-07-13 22:47:25 +02:00
b1892eaf63
fix(mail): set server name in tls config so that sending mail works with skipTlsVerify set to false 2022-07-13 19:57:44 +02:00
c906fc2b07
fix(mail): don't try to authenticate against the mail server when no credentials are provided
Related to https://github.com/go-vikunja/api/issues/34
2022-07-12 15:46:28 +02:00
4bb77b5539
fix(mail): don't set a username by default 2022-07-12 11:49:23 +02:00
5743a4afe5
fix: properly set tls config for mailer 2022-07-11 16:10:28 +02:00
62325de9cd
feat: use actual uuids for tasks 2022-07-11 14:54:33 +02:00
5cc4927b9e
fix: add missing error check 2022-07-07 23:23:15 +02:00
2b074c60a7
fix(caldav): properly parse durations when returning VTODOs
Resolves https://github.com/go-vikunja/frontend/issues/55
2022-07-07 23:20:37 +02:00
f5a4c136fb
fix: cycles in tasks array when memory caching was enabled
Resolves #1119
2022-07-07 18:34:49 +02:00
230478aae9
fix: remove credential escaping for postgres connections to allow for passwords with special characters
Resolves https://github.com/go-vikunja/api/issues/22
2022-07-07 18:04:16 +02:00
73c4c399e5
feat: use embed fs directly to embed the logo in mails 2022-07-07 15:54:38 +02:00
25ffa1bc2e
fix: prevent logging openid provider errors twice 2022-07-07 15:47:37 +02:00
4429ba2da1
fix(caldav): make sure the caldav tokens of non-local accounts are properly checked 2022-07-04 18:08:46 +02:00
d0e09d69d0 fix: tests 2022-06-30 14:21:17 +00:00
f30a9d1038 chore(docs): add new mailer option to docs 2022-06-30 14:21:17 +00:00
c62e26b6fe fix: revert renaming Attachments to Embeds everywhere 2022-06-30 14:21:17 +00:00
f4f8450d16 feat: embed the vikunja logo as inline attachment 2022-06-30 14:21:17 +00:00
30e0e98f77 feat: migrate away from gomail 2022-06-30 14:21:17 +00:00
01271c4c01
feat: allow only the authors of task comments to edit them 2022-06-16 17:38:27 +02:00
d837f8a624
fix: add missing migration 2022-06-16 16:56:35 +02:00
8869adfc27
feat: add setting to change overdue tasks reminder email time 2022-06-16 16:20:26 +02:00
7eb3b96a44
feat: send overdue tasks email notification at 9:00 in the user's time zone 2022-06-12 21:24:28 +02:00
2f25b48869
feat: restrict max avatar size
resolves #1171
2022-06-12 18:29:12 +02:00
e52c45d5aa fix: sort tasks logically and consistent across dbms (#1177)
This PR changes the behavoir of sorting tasks. Before, tasks were sorted with null values first. Now, null values are always sorted last which is usually what you want.

Partial fix for https://github.com/go-vikunja/frontend/issues/54

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1177
2022-05-30 20:53:58 +00:00
grahammiln
acaa85083f feat: ability to serve static files (#1174)
Added the configuration key, `service.staticpath`, to serve files from the configuration path on root (/).

Serving static files allows the api service to also serve the frontend content. This is a simple option for deploying Vikunja without needing any other servers or proxies.

Running a complete instance becomes:

    VIKUNJA_SERVICE_STATICPATH=/path/to/frontend ./vikunja

Where `/path/to/frontend` is a copy of Vikunja's frontend static files.

## Implementation

Providing a path, via the configuration or environment, adds a static file middleware to serve the path's contents from root (/).

By default, the configuration path is empty and Vikunja's existing behaviour is unchanged.

Co-authored-by: Graham Miln <graham.miln@dssw.co.uk>
Reviewed-on: vikunja/api#1174
Reviewed-by: konrad <k@knt.li>
Co-authored-by: grahammiln <grahammiln@noreply.kolaente.de>
Co-committed-by: grahammiln <grahammiln@noreply.kolaente.de>
2022-05-23 20:49:28 +00:00
f5ebada913
fix: set derived default values only after reading config from file or env 2022-05-23 22:12:15 +02:00
3ab0ac9f27 fix(deps): update module github.com/swaggo/swag to v1.8.2 (#1167)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1167
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-05-15 19:57:00 +00:00
9845fcc170
fix: add more methods to figure out the current binary location 2022-05-08 21:54:26 +02:00
tuxthepenguin
4960a498ff Add client-cert parameters of the Go pq driver to the Vikunja config (#1161)
Co-authored-by: tuxthepenguin <tux@saturnv.uphus-internal.de>
Reviewed-on: vikunja/api#1161
Reviewed-by: konrad <k@knt.li>
Co-authored-by: tuxthepenguin <tuxthepenguin@noreply.kolaente.de>
Co-committed-by: tuxthepenguin <tuxthepenguin@noreply.kolaente.de>
2022-04-23 15:46:00 +00:00
e4b50e84a4 feat: add caldav tokens (#1065)
# Description

This PR adds API routes to create and manage caldav tokens. These tokens can be used instead of a user password - required for users who are using external auth providers and don't have a password.

Fixes #842

Frontend: vikunja/frontend#1186

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1065
2022-03-30 18:25:56 +00:00
de97fcbd12 fix: lint 2022-03-30 16:36:07 +00:00
d3bdafb717 fix: decoding images for blurHash generation 2022-03-30 16:36:07 +00:00
6b51fae093 fix: return BlurHash in unsplash search results 2022-03-30 16:36:07 +00:00
ba2bdff391 chore: generate swagger docs 2022-03-30 16:36:07 +00:00
7fa0865188 fix: lint 2022-03-30 16:36:07 +00:00
6df865876d feat: return BlurHash for unsplash search results 2022-03-30 16:36:07 +00:00
2ec7d7a8a8 feat: save BlurHash from unsplash when selecting a photo from unsplash 2022-03-30 16:36:07 +00:00
f83b09af59 feat: generate a BlurHash when uploading a new image 2022-03-30 16:36:07 +00:00
362706b38d feat: add migration to create BlurHash strings for all list backgrounds 2022-03-30 16:36:07 +00:00
0a1d8c9404 feat: add date math for filters (#1086)
This adds support for relative dates in filters, similar to the ones from [grafana](https://grafana.com/docs/grafana/latest/dashboards/time-range-controls) or [elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/common-options.html#date-math).

In short, it allows you to filter for due dates by passing in dates like "now - 7d" to get a date from 7 days ago.

This is a very powerful addition for saved filters as they will allow you to create filters for all kinds of stuff where you previously only could use fixed dates. Now you can for example create a saved filter for "all tasks this week".

Frontend PR: vikunja/frontend#1342

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1086
2022-03-27 20:35:04 +00:00
ac6818a476
fix: checking for error types 2022-03-27 17:52:33 +02:00
5cf263a86f
feat: upgrade golangci-lint to 1.45.2 2022-03-27 16:55:37 +02:00
b60c69c5a8
chore: cleanup namespace creation 2022-03-06 17:09:05 +01:00
75f74b429e
fix: validate email address when creating a user via cli 2022-03-04 19:58:40 +01:00
8bf2254f4b
fix: restoring dumps with no config file saved in them 2022-02-19 17:46:10 +01:00
22e3f242a3
fix: disabling logging completely now works 2022-02-19 17:42:32 +01:00
8cb92b3924
fix(dump): don't try to save a config file if none was provided and dump vikunja env variables 2022-02-19 11:32:30 +01:00
44aaf0a4ec
fix: clarify which config file is used on startup 2022-02-19 11:32:30 +01:00
43f1daf40c
fix: microsoft todo migration not importing all tasks
Previously, we did not check if a list has more tasks than the ones returned. By default, the Microsoft Graph API only returns 10 tasks. If the user had more they would not get imported.
Now we check if there are more pages with tasks and pull them all in until we have everything.
2022-02-18 20:00:42 +01:00
1322cb16d7 feat: add long-lived api tokens (#1085)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1085
Co-authored-by: konrad <k@knt.li>
Co-committed-by: konrad <k@knt.li>
2022-02-06 13:18:08 +00:00
f7a06e4644 Enable a list to be moved across namespaces (#1096)
Co-authored-by: Simon Hilchenbach <simon@hilchenba.ch>
Reviewed-on: vikunja/api#1096
Reviewed-by: konrad <k@knt.li>
Co-authored-by: shilch <simon@hilchenba.ch>
Co-committed-by: shilch <simon@hilchenba.ch>
2022-01-23 12:59:43 +00:00
61d49c3a56 feat: add time zone setting for reminders (#1092)
Instead of naeveily checking for all reminders due in the next minute, we now check all reminders in all time zones in the next minutes. This essentially means checking for reminders due in the next 14 or past 12 hours. We then check for each user who would receive a reminder from that result if it is actually due in their time zone.

This should prevent issues where users would get the reminder in the time zone of their server, not in their own.

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1092
Co-authored-by: konrad <k@knt.li>
Co-committed-by: konrad <k@knt.li>
2022-01-16 11:05:56 +00:00
a31086a7a9
fix: lint 2021-12-12 16:03:58 +01:00
a98119f2d6
feat: save user language in the settings 2021-12-12 15:39:47 +01:00
8bb3f8d37c
fix: importing archived lists or namespaces 2021-12-12 13:18:01 +01:00
190a9f2a4c
fix: friendly name not getting synced on first login from openid
Resolves #874
2021-12-12 12:35:13 +01:00
5c88dfe88e
fix: user deletion schedule 2021-12-12 12:29:05 +01:00
70e005e7ce
fix: user not actually deleted 2021-12-12 12:28:18 +01:00
f581885e65
fix: user deletion reminder emails counting up
Resolves #1014
2021-12-12 12:24:42 +01:00
72d3c54efd
fix: user deletion never happens
Resolves #1024
2021-12-12 12:04:17 +01:00
73ee696fc3 feat: add marble avatar (#1060)
This adds the marble avatar from [boring avatars](https://github.com/boringdesigners/boring-avatars) as an option for user avatars. Each user gets a different one (based on their id).

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1060
Co-authored-by: konrad <k@knt.li>
Co-committed-by: konrad <k@knt.li>
2021-12-07 21:11:23 +00:00
fd0d462bf4
fix: importing tasks from todoist without a due time set
Resolves #897
2021-11-23 22:29:57 +01:00
f8a0a7e953
fix: deleting users with no namespaces
resolves #984
2021-11-22 22:34:20 +01:00
Joseph Kavanagh
36bf3d216a
feat: gravatar - Lowercase emails before MD5 hash (#10) 2021-11-16 22:10:22 +01:00
0b7762590f
fix: lint 2021-11-16 20:37:37 +01:00
c3e0e6405a
fix: importing trello attachments
Since jan 2021, trello requires authentication to access attachments. This commit passes the required auth headers to make downloading card attachments work.

resolves https://github.com/go-vikunja/api/issues/6
2021-11-14 21:47:51 +01:00
57e5d10eee
fix: sorting for saved filters
resolves #786
2021-11-14 21:03:55 +01:00
88a2cede19
feat: use wallpaper topic for default unsplash background list 2021-11-14 20:47:15 +01:00
093d0c65ca
feat: enable rate limit for unauthenticated routes 2021-11-14 20:42:33 +01:00
cf05de19b3
fix: updating a list might remove its background
resolves #1039
2021-11-13 17:52:14 +01:00
2683ef23d5
feat: expose if a user is a local user through the /user endpoint 2021-10-31 13:57:19 +01:00
516c812043
feat: expose if a user is a local user through its jwt token 2021-10-31 12:37:31 +01:00
9eca971c93
feat: don't require a password for data export from users authenticated with third-party auth 2021-10-31 12:37:08 +01:00
8f55af07c9
feat: add more debug logging when deleting users
related to #1021
2021-10-27 22:08:31 +02:00
jayden-c
dcb52c00f1 feat: improve account deletion email grammar (#1006)
Co-authored-by: Jayden Chan <jaydencn7@gmail.com>
Reviewed-on: vikunja/api#1006
Reviewed-by: konrad <k@knt.li>
Co-authored-by: jayden-c <jaydencn7@gmail.com>
Co-committed-by: jayden-c <jaydencn7@gmail.com>
2021-10-16 21:53:33 +00:00
50b65a517d
fix: correctly load and pass the user when deleting it
Fixes #984
2021-10-16 17:00:48 +02:00
d7e47a28d4
fix: don't try to load the namespace of a list if it is a shared list 2021-10-16 16:50:16 +02:00
c2b6119434
fix: make sure the full task is available in notifications 2021-10-16 16:38:59 +02:00
82a3330412 Added the ability to configure the JWT expiry date using a new server.jwtttl config parameter. (#999)
Co-authored-by: Stephen Hill <stephen@gatekiller.co.uk>
Reviewed-on: vikunja/api#999
Co-authored-by: stephen-hill <stephen@gatekiller.co.uk>
Co-committed-by: stephen-hill <stephen@gatekiller.co.uk>
2021-10-09 11:02:28 +00:00
fb9fa27488 healthcheck endpoint (#998)
Co-authored-by: Igor Rzegocki <igor@rzegocki.pl>
Reviewed-on: vikunja/api#998
Reviewed-by: konrad <k@knt.li>
Co-authored-by: ajgon <vikunja-gitea@ajgon.ovh>
Co-committed-by: ajgon <vikunja-gitea@ajgon.ovh>
2021-10-03 18:37:02 +00:00
0ca1560bf1 fix(deps): update module github.com/swaggo/swag to v1.7.3 (#990)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#990
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2021-09-26 12:44:37 +00:00
4de8ec56a6
fix: generate swagger docs 2021-09-26 14:18:44 +02:00
ae8db176db
feat: expose if task comments are enabled or not in /info 2021-09-26 13:37:57 +02:00
465f6d90ab
Fix tasks not exported 2021-09-08 18:40:54 +02:00
03d818fd9f
Fix tmp export file created in the wrong path 2021-09-08 17:44:23 +02:00
f019ae42bb
Fix exporting tasks from archived lists 2021-09-08 17:40:33 +02:00
9000f2c3cd
Fix lint 2021-09-07 19:09:44 +02:00
cc1bb3083f
Don't try to export items which do not have a parent 2021-09-06 22:14:38 +02:00
90146aea5b User Data Export and import (#967)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#967
Co-authored-by: konrad <k@knt.li>
Co-committed-by: konrad <k@knt.li>
2021-09-04 19:26:31 +00:00
dcddaab7b5
Set todoist migration redirect url to the frontend url by default 2021-08-14 18:27:29 +02:00
483496cc26
Fix saving reminders of repeating tasks 2021-08-13 21:36:16 +02:00
27119ad6d4 User account deletion (#937)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#937
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-08-11 19:08:10 +00:00
c3da454854 Update module github.com/golang-jwt/jwt to v4 (#930)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#930
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2021-08-03 21:43:18 +00:00
e38be9bd18 Update module github.com/labstack/echo/v4 to v4.5.0 (#929)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#929
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2021-08-02 18:33:53 +00:00
f237afd2ac
Fix panic on invalid smtp config 2021-08-02 00:05:13 +02:00
4c5f457313 Ensure case insensitive search on postgres (#927)
Reviewed-on: vikunja/api#927
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-08-01 21:40:25 +00:00
9c2a59582a
Fix setting up keyvalue storage in tests 2021-07-30 15:31:51 +02:00
d746c1bede
Notify the user after three failed login attempts 2021-07-30 15:01:04 +02:00
220f43331f
Reset failed totp attempts when logging in successfully 2021-07-30 14:46:10 +02:00
24f7d9b4f7
Only send an email about failed totp after three failed attempts 2021-07-30 14:42:03 +02:00
5cfc9bf2f9
Disable the user account after 10 failed password attempts 2021-07-29 18:45:22 +02:00
3572ac4b82
Send a notification on failed TOTP 2021-07-29 18:05:25 +02:00
1571dfa825 Task mentions (#926)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#926
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-07-29 15:42:49 +00:00
e600f61e06
Fix moving the done bucket around 2021-07-29 17:32:33 +02:00
6ccb85a0dc Reorder tasks, lists and kanban buckets (#923)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#923
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-07-28 19:06:40 +00:00
dac315db59
Fix jwt middleware 2021-07-27 15:25:48 +02:00
eae3cbc7bb
Replace jwt-go with github.com/golang-jwt/jwt 2021-07-27 10:46:28 +02:00
d9b38b85f6
Fix setting a saved filter as favorite 2021-07-20 21:32:25 +02:00
c7f337f303
Fix tests & lint 2021-07-20 11:00:20 +02:00
733f26f017
Fix error handling when deleting an attachment file 2021-07-20 10:14:49 +02:00
e4a0066e20
Make sure all associated entities of a task are deleted when the task is deleted 2021-07-19 23:52:58 +02:00
d28390d792
Fix task relations not getting properly cleaned up when deleting them 2021-07-19 23:40:18 +02:00
0b90d826be
Don't notify the user who created the team 2021-07-19 23:29:25 +02:00
4cf7c459da
Allow running migration 20210711173657 multiple times to fix issues when it didn't completely run through previously 2021-07-15 11:36:33 +02:00
2a80e552cc
Save user tokens as varchar(450) and not text to fix mysql indexing issues 2021-07-14 14:48:27 +02:00
7e229a1b83
Save user tokens as text and not varchar 2021-07-14 12:43:28 +02:00
4216ed7277 Refactor user email confirmation + password reset handling (#919)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#919
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-07-13 20:56:02 +00:00
d5d4d8b6ed
Fix lint 2021-07-13 12:16:12 +02:00
9559cbf1ec
Add more logging for test data api endpoint 2021-07-13 12:14:59 +02:00
7adbd21698
Fix setting task favorite status of related tasks
Not really reproducable locally, but a real issue.
2021-07-12 12:19:01 +02:00
e21a3904ff
Fix mapping task priorities from Vikunja to calDAV
Resolves #866
2021-07-11 15:03:50 +02:00
562ef9af36
Add searching for tasks by index 2021-07-11 14:19:59 +02:00
d0c77ad1c1 Make sure list / task favorites are set per user, not per entity (#915)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#915
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-07-10 10:21:54 +00:00
358661e060
Change task title to TEXT instead of varchar(250) to allow for longer task titles 2021-07-09 19:46:47 +02:00
32a07c4c61
Fix importing archived projects and done items from todoist 2021-07-08 11:37:50 +02:00
5b825f1cc8
Make sure a bucket exists or use the default bucket when importing tasks 2021-07-08 10:34:03 +02:00
50b49ffab6 Add support of Unix socket (#912)
Reviewed-on: vikunja/api#912
Reviewed-by: konrad <konrad@kola-entertainments.de>
Co-authored-by: andreymal <andriyano-31@mail.ru>
Co-committed-by: andreymal <andriyano-31@mail.ru>
2021-07-08 08:13:01 +00:00
8b6aeb8571
Fix lint 2021-07-07 20:53:26 +02:00
0c5dfe5c48
Better logging for errors while importing a bunch of tasks 2021-07-06 18:14:40 +02:00
d7932d2648
Don't fail when removing the last bucket in migration from other services 2021-07-06 15:43:38 +02:00
37718c3282
Todoist migration: don't panic if no reminder was found for task
See #897
2021-06-24 23:02:28 +02:00
6018573d81 Update module github.com/coreos/go-oidc to v3 (#885)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#885
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2021-06-14 20:56:29 +00:00
6b70069eba Update module prometheus/client_golang to v1.11.0 (#879)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#879
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2021-06-11 13:08:28 +00:00
9147e6739f
Fix authentication callback 2021-06-09 23:00:42 +02:00
570d146b21
Fix parsing openid config when using a json config file 2021-06-09 21:56:17 +02:00
78a206c818
Add setting for first day of the week 2021-06-03 18:11:44 +02:00
fc5703ac8c
Add truncate parameter to test fixtures setup 2021-06-03 15:30:31 +02:00
3277f6acf7 Add default list setting (#875)
Co-authored-by: Sytone <github@sytone.com>
Reviewed-on: vikunja/api#875
Reviewed-by: konrad <konrad@kola-entertainments.de>
Co-authored-by: sytone <kolaente@sytone.com>
Co-committed-by: sytone <kolaente@sytone.com>
2021-06-02 21:20:22 +00:00
8a1e98a7f2
Fix goimports 2021-05-31 21:05:14 +02:00
9a2655dbf1
Fix saving pointer values to memory keyvalue 2021-05-31 20:54:15 +02:00
d48aa101cf
Refactor & fix storing struct-values in redis keyvalue 2021-05-28 10:52:51 +02:00
df45675df3
Rearrange setting frontend url in config 2021-05-28 08:46:31 +02:00
afd6bde74d
Make sure the configured frontend url always has a / at the end 2021-05-28 08:39:27 +02:00
e23014dbe4
Fix swagger docs for create requests 2021-05-26 21:56:31 +02:00
8e65ffb99b
Fix duplicating empty lists 2021-05-26 12:01:50 +02:00
3f6d85497f
Fix error when searching for a namespace returned no results 2021-05-26 12:00:55 +02:00
88b9ea6a96
Fix error when searching for a namespace with subscribers 2021-05-26 11:04:29 +02:00
3973ce985d
Try to get more information about the user when authenticating with openid 2021-05-19 14:45:24 +02:00
2e52cc1802
Fix lint 2021-05-17 12:15:15 +02:00
20ede346b4
Only filter out failing openid providers if multiple are configured and one of them failed 2021-05-16 13:28:15 +02:00
b76ad8efe2
Add more logging and better error messages for openid authentication + clarify docs 2021-05-16 13:23:10 +02:00
86b7d224ab Expose tls parameter of Go MySQL driver to config file (#855)
Co-authored-by: Jonas Gunz <himself@jonasgunz.de>
Reviewed-on: vikunja/api#855
Reviewed-by: konrad <konrad@kola-entertainments.de>
Co-authored-by: kompetenzbolzen <himself@jonasgunz.de>
Co-committed-by: kompetenzbolzen <himself@jonasgunz.de>
2021-05-08 14:54:55 +00:00
9dc72c5c98
Use golang's tzdata package to handle time zones 2021-05-07 12:18:21 +02:00
0f5f85e687
Fix tests 2021-04-22 17:13:47 +02:00
4ceeb877b1
Fix checking list rights when accessing a bucket 2021-04-22 16:44:42 +02:00
6e263b6a91
Improve sending overdue task reminders by only sending one for all overdue tasks 2021-04-18 15:32:02 +02:00
7ff7b0d743
Improve duration format of overdue tasks in reminders 2021-04-18 14:25:50 +02:00
f429efc220
Add bucket limit validation 2021-04-15 16:55:21 +02:00
6e5a9868f5
Fix moving repeating tasks to the done bucket 2021-04-15 16:36:24 +02:00
b4d726f5a8 Add repeat monthly setting for tasks (#834)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#834
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-04-14 09:04:58 +00:00
d07b284ee3 Add reminders for overdue tasks (#832)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#832
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-04-11 15:08:43 +00:00
b3c604fd2f Add link share password authentication (#831)
Reviewed-on: vikunja/api#831
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-04-11 13:17:50 +00:00
126f3acdc8
Enable searching users by full email or name 2021-04-07 18:28:58 +02:00
8ddc00bd29
Fix getting user info from /user endpoint for link shares 2021-04-07 15:02:57 +02:00
cb0df3ebbc
Show empty avatar when the user was not found 2021-04-07 14:56:44 +02:00
84291679cc Add names for link shares (#829)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#829
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-04-07 12:44:39 +00:00
0b8173c1c3
Fix not able to make saved filters favorite 2021-04-03 16:49:20 +02:00
73f2d4532d
Make sure all tables are properly pluralized 2021-03-28 20:17:35 +02:00
6c3488b8aa
Fix event error handler retrying infinitely 2021-03-28 17:55:19 +02:00
be3184d49f
Add test for moving a task to another list 2021-03-24 22:47:03 +01:00
81d021e872 Improve loading labels performance (#824)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#824
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-03-24 21:46:20 +00:00
d1b87d2705 Add a "done" option to kanban buckets (#821)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#821
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-03-24 20:16:35 +00:00
7b29ac7128
Fix user uploaded avatars 2021-03-23 22:32:23 +01:00
532855d850
Fix filter for task index 2021-03-21 18:48:41 +01:00
ee436efba3
Add endpoint to remove a list background 2021-03-21 17:49:14 +01:00
6fa95e6492
Fix getting lists for shared, favorite and saved lists namespace 2021-03-18 21:39:38 +01:00
67167d4abb
Fix shared lists showing up twice 2021-03-14 21:12:03 +01:00
466b2b676c Pagingation for tasks in kanban buckets (#805)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#805
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-03-10 10:59:10 +00:00
6de3d8b3a1
Explicitly check if there are Ids before trying to get items by a list of Ids 2021-03-02 18:40:39 +01:00
3999580fe6
Add basic auth for metrics endpoint 2021-02-28 11:29:53 +01:00
4880a0265b
Fix notifications table not being created on initial setup 2021-02-22 21:20:13 +01:00
2178166ece Add crud endpoints for notifications (#801)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#801
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-02-21 14:50:34 +00:00
eb3a945678
Fix deleting task relations
While the request body of a DELETE request *can* have data in it, it is not really supported and pretty much undocumented. As such, it doesn't work in all clients and probably broke with recent updates.
This fixes this by moving all parts of the task relation used to identify it in the url.

More Info: https://stackoverflow.com/a/299696/10924593
2021-02-18 23:35:33 +01:00
d8623fe185
Cleanup listener names 2021-02-17 20:50:04 +01:00
c873c1ec32
Send a notification to the user when they are added to the list 2021-02-17 20:48:06 +01:00
0bd27ddeb7
Subscribe a user to a task when they are assigned to it 2021-02-17 20:14:38 +01:00
aaeb89db4f
Refactor getting all namespaces 2021-02-16 22:36:06 +01:00
911e5b22ee
Fix lint 2021-02-14 23:11:39 +01:00
bef22f5756
Fix tests 2021-02-14 23:03:44 +01:00
83f003355d
Fix sending notifications to users if the user object didn't have an email 2021-02-14 22:44:01 +01:00
e7875ecb3b Subscriptions and notifications for namespaces, tasks and lists (#786)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#786
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-02-14 19:18:14 +00:00
015ca310e9 Add notifications package for easy sending of notifications (#779)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#779
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-02-07 21:05:09 +00:00
9fe46f9a61
Don't try to get users for tasks if no tasks were found when looking for reminders 2021-02-07 14:46:47 +01:00
490ba2ea50
Fix due dates with times when migrating from todoist 2021-02-04 21:06:01 +01:00
fb53322d40
Change the name of the newly created bucket from "New Bucket" to "Backlog" 2021-02-04 20:48:07 +01:00
d600d8b5a6
Fix IncrBy and DecrBy in memory keyvalue implementation if there was no value set previously 2021-02-03 21:59:45 +01:00
0ab9ce9ec4 Add events (#777)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#777
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-02-02 22:48:37 +00:00
c4a71016b8
Update copyright year 2021-02-02 20:19:13 +01:00
657dcc5313
Fix lint 2021-01-31 13:51:23 +01:00
2d283b78c2
Fix the shared lists pseudo namespace containing owned lists 2021-01-31 13:09:14 +01:00
6bdc1fdb0d
Only send reminders for undone tasks 2021-01-31 12:54:15 +01:00
d69c799197
Fix resetting the bucket limit 2021-01-31 12:40:02 +01:00
2e88600c93
Change keyvalue.Get to return if a value exists or not instead of an error 2021-01-31 12:32:46 +01:00
2447f84e2b Fix /dav/principals/*/ throwing a server error when accessed with GET instead of PROPFIND (#769)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#769
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-01-16 14:37:35 +00:00
e16c5f72ca
Fix setting the user in created_by when uploading an attachment 2021-01-15 22:50:55 +01:00
20af034d78
Fix retrieving over openid providers if there are none
Fixes #767
2021-01-15 20:40:07 +01:00
adf1172c39 Add tests for sending task reminders (#757)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#757
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-01-09 13:59:54 +00:00
ac23536c36
Make sure a password reset token can be used only once 2020-12-30 21:51:45 +01:00
787044628f
Fix password reset without a reseet token 2020-12-30 21:43:14 +01:00
456af4d4a9
Fix go header lint 2020-12-29 02:04:20 +01:00
9baf6d39bd
Change license to AGPLv3 2020-12-23 16:41:52 +01:00
8d1a09b5a2 Use db sessions everywere (#750)
Fix lint

Fix lint

Fix loading tasks with search

Fix loading lists

Fix loading task

Fix loading lists and namespaces

Fix tests

Fix user commands

Fix upload

Fix migration handlers

Fix all manual root handlers

Fix session in avatar

Fix session in list duplication & routes

Use sessions in migration code

Make sure the openid stuff uses a session

Add alias for db type in db package

Use sessions for file

Use a session for everything in users

Use a session for everything in users

Make sure to use a session everywhere in models

Create new session from db

Add session handling for user list

Add session handling for unsplash

Add session handling for teams and related

Add session handling for tasks and related entities

Add session handling for task reminders

Add session handling for task relations

Add session handling for task comments

Add session handling for task collections

Add session handling for task attachments

Add session handling for task assignees

Add session handling for saved filters

Add session handling for namespace and related types

Add session handling for namespace and related types

Add session handling for list users

Add session handling for list tests

Add session handling to list teams and related entities

Add session handling for link shares and related entities

Add session handling for labels and related entities

Add session handling for kanban and related entities

Add session handling for bulk task and related entities

Add session handling for lists and related entities

Add session configuration for web handler

Update web handler

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#750
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-12-23 15:32:28 +00:00
fa68e89c04
Add task filters for kanban
Signed-off-by: kolaente <k@knt.li>
2020-12-22 12:38:05 +01:00
2d4e2e452c Add task filter for lists and namespaces (#748)
Add more tests for getting namespaces

Fix namespaces not found

Fix namespaces not found

Make like the default

Update docs & fix docs

Enable searching namespaces by their ids

Enable searching lists by their ids

Enable searching labels by their ids

Enable searching by user ids

Update docs

Add namespace filter

Add task filter for lists

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#748
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-12-21 23:13:15 +00:00
03e4bf30c2 Add task filter for labels (#747)
Update docs

Add task filter for labels

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#747
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-12-20 12:41:36 +00:00
18325e964d Add task filter for assignees (#746)
Update docs

Add filter by assignee

Fix string values

Update docs

Update docs

Make "in" task filter actually work

Add "in" filter type

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#746
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-12-19 21:39:11 +00:00
92bcce3f7c Add task filter for reminders (#745)
Update swagger docs about reminders

Fix filter concat for reminders

Add task filter for reminders

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#745
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-12-19 15:14:20 +00:00
9508d0faee
Fix missing auto increments from b0d4902406 on mysql
Fixes #744
2020-12-19 15:04:30 +01:00
90817b6dae
Add "like" filter comparator 2020-12-19 13:56:55 +01:00
b2e4fde63a Add email reminders (#743)
Fix tests

Expose email reminder setting through jwt

Set reminders on by default

Fix lint

Make user email configurable

Expose email reminder setting through /info

Don't try to send any reminders if none were found

More spacing for buttons

Fix db time format

Enable reminders by default

Make emails look more like the frontend

Add config to disable it

Add sending emaisl

Add getting all task users and reminding them

Add getting the next reminder in a cron

Move task reminder to separate file

Add cron

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#743
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-12-18 23:21:17 +00:00
27c44d6d5e
Change avatar endpoint 2020-12-18 23:11:11 +01:00
b0d4902406 Make sure all int64 db fields are using bigint when actually storing the data (#741)
Fix lint

Fix migration query for postgres

Fix migration statements

Add migration to make all int(11) fields bigint by default

Make all int(11) fields bigint by default

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#741
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-12-18 16:51:22 +00:00
f15a8baee3 Update module ulule/limiter/v3 to v3.8.0 (#699)
fmt

Upgrade redis client to v8 everywhere

Update module ulule/limiter/v3 to v3.8.0

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#699
Co-Authored-By: renovate <renovatebot@kolaente.de>
Co-Committed-By: renovate <renovatebot@kolaente.de>
2020-12-18 15:21:21 +00:00
0bd2632d29 Add login via email (#740)
Add login via email

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#740
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-12-18 13:54:49 +00:00
8d739b2cf9 Refactor adding more details to tasks (#739)
Refactor adding more details to tasks

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#739
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-12-18 13:54:36 +00:00
ccfa019870
Don't create a list identifier by default 2020-12-18 13:07:34 +01:00
969e467f48 Add colors for caldav (#738)
Add colors for caldav

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#738
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-12-18 12:04:27 +00:00
f5b5204776 Add Microsoft Todo migration (#737)
Add more logs

Fix lint

Generate docs

Add swagger docs

Add microsoft todo parsing logic

go mod tidy

Add basic test structure

Add more fields to tasks

rename microsoft todo package

Add getting microsoft todo data

Add structs and helper methods

Add microsoft todo config and routes

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#737
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-12-18 11:12:05 +00:00
9f3d898150 Add trello migration (#734)
Fix tests for background images

Generate docs

Fix lint

Do the swag

Add more logging

Remove the default bucket if it was empty

Add launch.json

Make importing backgrounds work

Add comment

Fix getting task attachments

Fix getting trello token

Add trello migration routes and status

Add support for converting checklists

Add test for attachments

Add the actual conversion

Add Trello conversion test

Add migration function stubs

Add basic trello migration structure

Add trello migration config

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#734
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-12-17 13:44:04 +00:00
00ed5884b4 Add support for migrating todoist boards (#732)
Add migrating buckets to converting todoist to vikunja structure

Add buckets migration

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#732
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-12-16 14:19:09 +00:00
e4de700a10
Simplify updating task reminders 2020-12-16 13:05:58 +01:00
08430f1951 Update golang.org/x/crypto commit hash to c8d3bf9 (#710)
Change terminal package

Update golang.org/x/crypto commit hash to c8d3bf9

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#710
Co-Authored-By: renovate <renovatebot@kolaente.de>
Co-Committed-By: renovate <renovatebot@kolaente.de>
2020-12-02 21:33:03 +00:00
9334b29366 Add testing endpoint to reset db tables (#716)
Fix lint

Better error messages

Add docs

Add testing endpoint to reset db

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#716
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-11-28 23:08:30 +00:00
d2d610e0f5
Fix /info endpoint 500 error when no openid providers were configured 2020-11-26 21:26:31 +01:00
ae6144c042
Fix getting current user when updating avatar or user name 2020-11-21 22:02:49 +01:00
d1c65935e6
Add name field to users 2020-11-21 21:51:55 +01:00
2b5c9ae7a8 Authentication with OpenID Connect providers (#713)
Add config docs

Lint

Move provider-related stuff to separate file

Refactor getting auth providers

Fix tests

Fix user tests

Fix openid tests

Add swagger docs

Fix lint

Fix lint issues

Fix checking if the user already exists

Make sure to create a new namespace for new users

Docs

Add tests for openid

Remove unnessecary err check

Consistently return nil users if creating a new user failed

Move sending confirmation email to separate function

Better variable names

Move checks to separate functions

Refactor creating user into seperate file

Fix creating new local users

Test creating new users from different issuers

Generate a random username right away if no preferred username has been given

Add todo

Cache openid providers

Add getting int clientids

Fix migration

Move creating tokens to auth package

Add getting or creating a third party user

Add parsing claims

Add retreiving auth tokens

Add token callback from openid package

Add check for provider key

Add routes

Start adding openid auth handler

Add config for openid auth

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#713
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-11-21 16:38:58 +00:00
316ac0558b
Fix task updated timestamp not being updated in the response after updating a task 2020-10-25 12:59:28 +01:00
ffce9b51cc Fix completion status in DAV for OpenTasks and multiline descriptions (#697)
Add tests for multiline descriptions and completed state

Fix caldav descriptions

Fix caldav task complete status for OpenTasks

Co-authored-by: Martin Giger <martin@humanoids.be>
Reviewed-on: vikunja/api#697
Co-Authored-By: freaktechnik <martin@humanoids.be>
Co-Committed-By: freaktechnik <martin@humanoids.be>
2020-10-21 21:03:19 +00:00
707709deb1
Fix not possible to create tasks if metrics were enabled 2020-10-20 20:28:44 +02:00
214f2f008e Support absolute iCal timestamps in CalDAV requests (#691)
no need to export from there I think

parse absolute ical timestamps

Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-authored-by: Martin Giger <martin@humanoids.be>
Reviewed-on: vikunja/api#691
Co-Authored-By: freaktechnik <martin@humanoids.be>
Co-Committed-By: freaktechnik <martin@humanoids.be>
2020-10-19 09:11:15 +00:00
1555081939 fetch tasks for caldav lists (#641)
Fix shadowed error

Panic if a TaskCollection.ReadAll does not return []*models.Task

Fetch tasks for caldav lists

Co-authored-by: kolaente <k@knt.li>
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-authored-by: Martin Giger <martin@humanoids.be>
Reviewed-on: vikunja/api#641
Co-Authored-By: freaktechnik <martin@humanoids.be>
Co-Committed-By: freaktechnik <martin@humanoids.be>
2020-10-18 10:40:50 +00:00
7fe9e6d3f6 Update module swaggo/swag to v1.6.8 (#680)
Regenerate swagger docs with new swaggo

Update module swaggo/swag to v1.6.8

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#680
Co-Authored-By: renovate <renovatebot@kolaente.de>
Co-Committed-By: renovate <renovatebot@kolaente.de>
2020-10-17 18:03:05 +00:00
38b5c7fb6c
Add checks if tasks exist in maps before trying to access them
Signed-off-by: kolaente <k@knt.li>
2020-10-12 19:33:17 +02:00
e26df26f78
Fix migrating items with large items from todoist
see #266
2020-10-12 08:08:52 +02:00
699d3d6060 Add Golangci Lint (#676)
Increase golangci timeout

Fix installing golangci-lint in ci

Remove mage targets replaced by golangci

Run golint in ci

Add goheader linter

Enable & fix more linters

Fix lint issues

Add mage target to automagically fix issues found by golangci

golangci-lint run --fix

Add golangci config

Add golangci mage target

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#676
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-10-11 20:10:03 +00:00
d56a611be7 Key-Value Storages (#674)
Fix lint

Add docs for keyvalue config options

Use keyvalue store to cache unsplash photo results

Cleanup

Use keyvalue store for upload avatar

Use keyvalue store for initials avatar

Fix initializing metrics

Use keyvalue for metrics

Add IncryBy and DecrBy methods to increase or decrease a value

Fix lint

Return custom error if a key does not exist

Init keyvalue storage

Follow the keyvalue storage setting for things like cache and other

Add docs

Add configuration of the storage backend

Add redis keyvalue storage implementation

Add doc comments

Add methods to use storage through the package itself

Add memory implementation for keyvalue store

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#674
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-10-10 16:53:59 +00:00
b3d09cd2d4
Fix loading list background information for uploaded backgrounds
Signed-off-by: kolaente <k@knt.li>
2020-09-28 20:53:17 +02:00
64d125afd9 Testing improvements (#666)
Change method names to avoid doubling db

Assert team test exists

Assert team member test exists

Assert task test exists

Assert task relation test exists

Assert task comment test exists

Better tests for team namespaces

Assert exists in namespace users tests

Assert exists in namespace tests

Assert exists in user list tests

Assert exists in list tests

Better team list tests

Assert label tests exist in db

Assert label task tests exist in db

Assert label task tests exist in db

Assert kanban tests exist in db

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#666
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-09-27 15:45:17 +00:00
1776eb56fe
Fix upload avatar not working
Signed-off-by: kolaente <k@knt.li>
2020-09-27 12:50:52 +02:00
0fb2edf051 Saved filters (#655)
Fix updating saved filters

Fix filter not loadable because of missing param declaration

Add fancy special cases for postgres exists in db

Add special case for postgrs json

Add read one test

Add rights tests

Fix lint

Fixed getting a single saved filter from db

Add tests for the usual crud methods

Add test stubs and TODOs

Add test for converting saved filter ids to list ids and vice versa

Add test fixture for saved filters and fix existing tests

Fix exposed json variables of filters

Fix creating saved filters table for tests

Add getting saved filters as pseudo namespace

Cleanup

Refactor getting all namespaces to use a map for easier handling of pseudo namespaces

Add custom erros for saved filters

Swagger docs

Fix lint

Add routes for saved filters

Add alias for mage build

Add method to get a saved filter from the lists endpoint

Add getting tasks from a saved filter

Add create, update, delete, read one methods

Add rights methods for saved filters

Fix docs minLength

Add saved filters column

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#655
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-09-26 21:02:17 +00:00
6bdddd462a Favorite lists (#654)
Add tests

Remove the favorites pseudo namespace if there are no lists or tasks favorited

Regenerate swagger docs

Fix favorite lists not being updated because of nonexisting users (the favorite list does not have one)

Make the pseudo favorites list always favorited

Add favorited lists to the favorites pseudo namespace

Add favorite field to list

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#654
2020-09-06 14:20:16 +00:00
e5559137dd Favorite tasks (#653)
Fixed namespace tests

Add test for favorite tasks

Fix favorite tasks not being updated

Fix integration tests

Fix lint

Return a pseudo namespace and list for favorites

Make sure users can only see their favorites

Add condition show tasks from the favorites list

Regenerate swagger docs

Add favorite field to task

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#653
2020-09-05 20:16:02 +00:00
ecf09e17a8
Only check if a bucket limit is exceeded when moving a task between buckets 2020-09-04 22:01:33 +02:00
14d706c91e Kanban bucket limits (#652)
Fix integration tests

Generate swagger docs

Add test for moving a task between buckets

Add check for bucket limit when updating a task

Add fixture to ensure a bucket with a high limit will never exceed the limit

Refactor bucket limit check into seperate function

Add test for creating and fix

Fix unexported field

Add error in case a task was added to a bucket which has its limit already exceeded

Add migration to add new task field

Add limit field to buckets

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#652
2020-09-04 14:37:56 +00:00
e9b1786188
Regenerate swagger docs 2020-09-04 13:15:46 +02:00
e4dd314079
Add caldav enabled/disabled to /info endpoint 2020-09-04 09:58:42 +02:00
d359130bcf Switch to mage (#651)
Add comment about magefile compile

Switch make to mage commands in drone

Fix misspell

Update docs

Add general release command

Add reprepro command

Make sure the filename contains the proper version

Add deb package building

Add zip command

Preserve file permissions when copying files

Fix release:os-package

Make sure to not create checksums of directories

Cleanup

Only compress what upx is able to compress

Add check command

Add release:os-package command

Add copy command

Add comments

Add compress step

Move releasing binaries to a more general function and add ones of linux + darwin

Add release:windows command

Add release:dir command

Add namespaces for commands

Reorder

Add command to run all checks at once

Add goconst-check

Add gosec-check

Add static-check

Add gocyclo-check

Add ineffasign-check

Add misspell-check

Add command to check for swagger docs regeneration

Add comments

Add command to generate swagger docs

Reorder

Add check for installing golint before running it

Add fmt check command

Add fmt command

Use runAndStreamOutput everywhere

Add aliases and comments

Add todo

Reorder

Add test coverage command

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#651
2020-09-03 15:13:19 +00:00
fa718e2576
Fix token renew for link shares
Signed-off-by: kolaente <k@knt.li>
2020-08-18 16:55:44 +02:00
c517a87b85
Don't add a subtask to the top level of tasks to not add it twice in the list 2020-08-17 22:30:24 +02:00
a58b932743
Work around tasks with attachments not being duplicated 2020-08-16 23:44:16 +02:00
301bebf8d3
Only try to download attachments from todoist when there is a url
Credit: freaktechnik
2020-08-16 23:26:19 +02:00
d192c36c39
Add better tests for namespaces 2020-08-15 22:16:36 +02:00
bdfb804bb2
Fix reading passwords on windows 2020-08-13 17:59:10 +02:00
16dbcfda7e Manage users via cli (#632)
Add users cli commands to docs

Fix checking for changing username or user email

Add user status change command

Make sure only one user exists with a particular email when updating

Add password reset

Add user id to help

Remove user delete (too many possible side effects, postponed until later)

Make sure to fail on any errors

Fail if changing the username would result in duplicate users

Add user update command

Add user create command

Add command stubs for all commands

Render users in a beautiful table

Started adding user list command

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#632
2020-08-13 15:34:02 +00:00
4a70c81b33
Make sure to require admin rights when modifying list/namespace users to be consistent with teams
Signed-off-by: kolaente <k@knt.li>
2020-08-12 18:20:47 +02:00
bd8c1c3bb7 Return rights when reading a single item (#626)
Fix lint

Update docs

Fix loading all rights (list & namespace)

Add tests

Update web framework

Make tests run again

Update all calls to CanRead methods

Update task attachment & task comment & task rights to return the max right

Update team rights to return the max right

Update namespace rights to return the max right

Update list rights to return the max right

Update link share rights to return the max right

Update label rights to return the max right

Update web dependency

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#626
2020-08-10 12:11:43 +00:00
d718d247c8
Fix users with disabled totp but not enrolled being unable to login 2020-08-07 16:41:35 +02:00
6a82d4e2af
Fix updating team admin status 2020-08-05 17:28:11 +02:00
11722bf029
Add update route to toggle team member admin status 2020-08-05 17:21:17 +02:00
dfb7730b63 More avatar providers (#622)
Don't fail if the last avatar file does not exist when deleting it

Fix lint

Remove old global avatar setting and update docs

Generate docs

Invalidate the avatar cache when uploading a new one

Add debug logs

Add caching for upload avatars

Add cache locks

Fix encoding

Resize the uploaded image to a max of 1024 pixels

Remove the old uploaded avatar if one already exists

Add mimetype check for images

Set avatar provider to upload when uploading an avatar

Add upload avatar provider

Make font size smaller to let the initials still look good in smaller sizes

Add debug log

Add cache and resizing of initials avatars

Make font size depend on avatar size

Add drawing initials avatar

Add initials provider

Make the initials avatar provider the default

Add routes

Add user avatar settings handler methods

Add user avatar provider field

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#622
2020-08-02 17:16:58 +00:00
e4539ef232 Use db sessions for task-related things (#621)
Use db sessions for task-related things

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#621
2020-08-01 16:54:38 +00:00
41cf73a473
Add option to configure legal urls 2020-07-18 18:53:56 +02:00
9acba7d3f0
Fix duplicating a list with background 2020-07-17 14:16:59 +02:00
2d567bfe0f
Make sure lists which would have a duplicate identifier can still be duplicated
+ debug logging for duplicating lists
2020-07-17 13:26:49 +02:00
092aae3260
Add config option to force ssl connections to connect with the mailer 2020-07-14 17:30:39 +02:00
4db06ba9a1 Fix creating lists with non ascii characters (#607)
Fix test name

Fix migrating lists with non utf-8 characters in their name

Fix creating lists with non utf-8 characters

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#607
2020-07-07 07:48:12 +00:00
78791f31a4
Fix parsing todoist reminder dates 2020-07-05 20:49:29 +02:00
ec3fa9300b
Fix parsing todoist reminder dates 2020-07-05 17:48:36 +02:00
ae12871bd7
Fix decoding active users from redis 2020-07-02 23:19:03 +02:00
7141050f8b
Make sure the metrics map accesses only happen explicitly 2020-07-02 21:16:39 +02:00
f57b7e989f
Fix updating the index when moving a task 2020-07-01 16:54:18 +02:00
556ccd68c1
Set the list identifier when creating a new task 2020-07-01 11:17:18 +02:00
1181039249 Duplicate Lists (#603)
Fix buckets not being duplicated correctly

Fix list id param not working

Add api endpoint

Add swagger docs

Add comment about test

Make duplicating actually work

Add copying link shares

Add copying list backgrounds

Add copying task relations

Add copying task comments

Add copying assignees

Add copying task task label relations

Add copying task attachments

Add duplicating tasks

Add basic struct and methods

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#603
2020-06-30 20:53:14 +00:00
9750a23dbe
Make the db timezone migration mysql compatible 2020-06-30 11:29:47 +02:00
1c93aab7e0
Fix not loading timezones on all operating systems 2020-06-30 09:55:46 +02:00
3b2289c8fa
Fix swagger docs 2020-06-28 16:25:46 +02:00
2820d92ab3
Expose namespace id when querying lists 2020-06-27 23:00:15 +02:00
08205008e7 Migrate all timestamps to real iso dates (#594)
Fix query param name

Add option to include null results when filtering

Always set db time to gmt

Fix null filter

Fix timezone setting for todoist parsing

Fix timezone setting for wunderlist parsing

Fix import

Fix caldav reminder parsing

Use timezone from config

Add error and test for invalid filter values

Fix integration tests

Remove task collection date hack

Fix task filter

Fix lint

Fix tests and fixtures for date timezone stuff

Properly set timezone

Change fixtures time zone to gmt

Set db timezone

Set created and updated timestamps for all fixtures

Fix lint

Fix test fixtures

Fix misspell

Fix test fixtures

Partially fix tests

Remove timeutil package

Remove adding _unix suffix hack

Remove _unix suffix

Move all timeutil.TimeStamp to time.Time

Remove all Unix suffixes in field names

Add better error messages when running migrations

Make sure to not migrate 0 unix timestamps to 1970 iso dates

Add migration script for sqlite

Add converting sqlite values

Convert 0 unix timestamps to null in postgres

Convert 0 to null in timestamps

Automatically rename _unix suffix

Add all tables and columns for migration

Fix sql migration query for mysql

Fail with an error if trying to use an unsupported dbms

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#594
2020-06-27 17:04:01 +00:00
e17cac854a
Fix removing existing sqlite files 2020-06-27 16:34:53 +02:00
974d028e51
Fix sqlite db not working when creating a new one 2020-06-26 19:45:19 +02:00
be11362533
Fix searching for unsplash pictures with words that contain a space 2020-06-26 00:37:10 +02:00
912abb3a10
Fix namespace title not being updated 2020-06-26 00:03:28 +02:00
0add1dce01
Add go version to version command 2020-06-25 15:59:06 +02:00
c8605d6b3d
Enable upload backgrounds by default 2020-06-23 22:53:23 +02:00
caee123f9d
Add better errors if the sqlite db file is not writable 2020-06-23 11:21:42 +02:00
150c3f032c
Prevent crashing when trying to register with an empty payload 2020-06-21 20:54:46 +02:00
e4f150bbe3 Restore command (#593)
Add waiting for changes to config file

Add max size for config files

Restore files

Restore database file

Expose migrate to

Move init stuff to seperate package

Add restoring config file

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#593
2020-06-21 15:30:48 +00:00
db0126968a
Improve memory usage of dump by not loading all files in memory prior to adding them to the zip 2020-06-20 11:48:45 +02:00
c12bac0c96
Return errors when dumping 2020-06-20 11:37:51 +02:00
fba333866d Add dump command (#592)
Fix files location in dump

Fix gitignore

Add docs

Add dumps to gitignore

Move dump to seperate package

logging

Dump files

Dump version

Dump database

Dump config

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#592
2020-06-19 21:29:02 +00:00
d02d413c5e Sentry integration (#591)
Use sentry echo integration to send errors

Only capture errors not already handled by echo

Add sentry panic handler

Add sentry library

Add sentry init

Add sentry config

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#591
2020-06-19 18:47:15 +00:00
021e3e307b
Remove build date from binary 2020-06-18 19:26:53 +02:00
525a547500
Remove min length for labels, lists, namespaces, tasks and teams 2020-06-17 18:52:23 +02:00
ca4d5000ed
Add list background information when getting all lists 2020-06-16 18:57:08 +02:00
24c1098736
Fix resetting list, label & namespace colors 2020-06-15 11:32:07 +02:00
47d7e713af Repeat tasks after completion (#587)
Fix integration tests

Add updating start and end date from current date

Add updating reminders from current date

Add updating reminders from current date

Add updating due date from current date

Add updating flag

Add tests

Add field to repeat a task after current date

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#587
2020-06-14 11:04:38 +00:00
ab1d58959f Ensure task dates are in the future if a task has a repeating interval (#586)
Ensure task dates are in the future if a task has a repeating interval

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#586
2020-06-13 21:32:31 +00:00
f5e44d9eb3
Reorganize cmd init functions 2020-06-13 19:44:45 +02:00