Commit Graph

81 Commits

Author SHA1 Message Date
6ccb85a0dc Reorder tasks, lists and kanban buckets (#923)
All checks were successful
continuous-integration/drone/push Build is passing
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
eae3cbc7bb
Replace jwt-go with github.com/golang-jwt/jwt
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-27 10:46:28 +02:00
4216ed7277 Refactor user email confirmation + password reset handling (#919)
All checks were successful
continuous-integration/drone/push Build is passing
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
32a07c4c61
Fix importing archived projects and done items from todoist
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-08 11:37:50 +02:00
5b825f1cc8
Make sure a bucket exists or use the default bucket when importing tasks
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-08 10:34:03 +02:00
8b6aeb8571
Fix lint
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-07 20:53:26 +02:00
0c5dfe5c48
Better logging for errors while importing a bunch of tasks
Some checks failed
continuous-integration/drone/push Build is failing
2021-07-06 18:14:40 +02:00
d7932d2648
Don't fail when removing the last bucket in migration from other services
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-06 15:43:38 +02:00
37718c3282
Todoist migration: don't panic if no reminder was found for task
All checks were successful
continuous-integration/drone/push Build is passing
See #897
2021-06-24 23:02:28 +02:00
6018573d81 Update module github.com/coreos/go-oidc to v3 (#885)
Some checks failed
continuous-integration/drone/push Build is failing
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
9147e6739f
Fix authentication callback
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-09 23:00:42 +02:00
570d146b21
Fix parsing openid config when using a json config file
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-09 21:56:17 +02:00
8a1e98a7f2
Fix goimports
All checks were successful
continuous-integration/drone/push Build is passing
2021-05-31 21:05:14 +02:00
9a2655dbf1
Fix saving pointer values to memory keyvalue
Some checks failed
continuous-integration/drone/push Build is failing
2021-05-31 20:54:15 +02:00
d48aa101cf
Refactor & fix storing struct-values in redis keyvalue
All checks were successful
continuous-integration/drone/push Build is passing
2021-05-28 10:52:51 +02:00
3973ce985d
Try to get more information about the user when authenticating with openid
All checks were successful
continuous-integration/drone/push Build is passing
2021-05-19 14:45:24 +02:00
2e52cc1802
Fix lint
All checks were successful
continuous-integration/drone/push Build is passing
2021-05-17 12:15:15 +02:00
20ede346b4
Only filter out failing openid providers if multiple are configured and one of them failed
Some checks failed
continuous-integration/drone/push Build is failing
2021-05-16 13:28:15 +02:00
b76ad8efe2
Add more logging and better error messages for openid authentication + clarify docs
All checks were successful
continuous-integration/drone/push Build is passing
2021-05-16 13:23:10 +02:00
73f2d4532d
Make sure all tables are properly pluralized
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-28 20:17:35 +02:00
ee436efba3
Add endpoint to remove a list background
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-21 17:49:14 +01:00
490ba2ea50
Fix due dates with times when migrating from todoist
All checks were successful
continuous-integration/drone/push Build is passing
2021-02-04 21:06:01 +01:00
d600d8b5a6
Fix IncrBy and DecrBy in memory keyvalue implementation if there was no value set previously
All checks were successful
continuous-integration/drone/push Build is passing
2021-02-03 21:59:45 +01:00
0ab9ce9ec4 Add events (#777)
All checks were successful
continuous-integration/drone/push Build is passing
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
Some checks failed
continuous-integration/drone/push Build is failing
2021-02-02 20:19:13 +01:00
2e88600c93
Change keyvalue.Get to return if a value exists or not instead of an error
Some checks failed
continuous-integration/drone/push Build is failing
2021-01-31 12:32:46 +01:00
20af034d78
Fix retrieving over openid providers if there are none
Some checks failed
continuous-integration/drone/push Build is failing
Fixes #767
2021-01-15 20:40:07 +01:00
456af4d4a9
Fix go header lint
All checks were successful
continuous-integration/drone/push Build is passing
2020-12-29 02:04:20 +01:00
9baf6d39bd
Change license to AGPLv3
Some checks failed
continuous-integration/drone/push Build is failing
2020-12-23 16:41:52 +01:00
8d1a09b5a2 Use db sessions everywere (#750)
Some checks failed
continuous-integration/drone/push Build is failing
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
b2e4fde63a Add email reminders (#743)
All checks were successful
continuous-integration/drone/push Build is passing
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
b0d4902406 Make sure all int64 db fields are using bigint when actually storing the data (#741)
Some checks reported errors
continuous-integration/drone/push Build was killed
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)
All checks were successful
continuous-integration/drone/push Build is passing
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
f5b5204776 Add Microsoft Todo migration (#737)
All checks were successful
continuous-integration/drone/push Build is passing
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)
All checks were successful
continuous-integration/drone/push Build is passing
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)
All checks were successful
continuous-integration/drone/push Build is passing
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
d2d610e0f5
Fix /info endpoint 500 error when no openid providers were configured
Some checks failed
continuous-integration/drone/push Build is failing
2020-11-26 21:26:31 +01:00
d1c65935e6
Add name field to users
All checks were successful
continuous-integration/drone/push Build is passing
2020-11-21 21:51:55 +01:00
2b5c9ae7a8 Authentication with OpenID Connect providers (#713)
All checks were successful
continuous-integration/drone/push Build is passing
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
707709deb1
Fix not possible to create tasks if metrics were enabled
Some checks failed
continuous-integration/drone/push Build is failing
2020-10-20 20:28:44 +02:00
38b5c7fb6c
Add checks if tasks exist in maps before trying to access them
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kolaente <k@knt.li>
2020-10-12 19:33:17 +02:00
e26df26f78
Fix migrating items with large items from todoist
All checks were successful
continuous-integration/drone/push Build is passing
see #266
2020-10-12 08:08:52 +02:00
699d3d6060 Add Golangci Lint (#676)
All checks were successful
continuous-integration/drone/push Build is passing
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)
All checks were successful
continuous-integration/drone/push Build is passing
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
c517a87b85
Don't add a subtask to the top level of tasks to not add it twice in the list
All checks were successful
continuous-integration/drone/push Build is passing
2020-08-17 22:30:24 +02:00
301bebf8d3
Only try to download attachments from todoist when there is a url
All checks were successful
continuous-integration/drone/push Build is passing
Credit: freaktechnik
2020-08-16 23:26:19 +02:00
bd8c1c3bb7 Return rights when reading a single item (#626)
All checks were successful
continuous-integration/drone/push Build is passing
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
dfb7730b63 More avatar providers (#622)
All checks were successful
continuous-integration/drone/push Build is passing
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
78791f31a4
Fix parsing todoist reminder dates
All checks were successful
continuous-integration/drone/push Build is passing
2020-07-05 20:49:29 +02:00
ec3fa9300b
Fix parsing todoist reminder dates
All checks were successful
continuous-integration/drone/push Build is passing
2020-07-05 17:48:36 +02:00