Commit Graph

74 Commits

Author SHA1 Message Date
konrad 9f3d898150 Add trello migration (#734)
continuous-integration/drone/push Build is passing Details
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
konrad 9334b29366 Add testing endpoint to reset db tables (#716)
continuous-integration/drone/push Build is passing Details
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
kolaente d1c65935e6
Add name field to users
continuous-integration/drone/push Build is passing Details
2020-11-21 21:51:55 +01:00
konrad 2b5c9ae7a8 Authentication with OpenID Connect providers (#713)
continuous-integration/drone/push Build is passing Details
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
konrad 699d3d6060 Add Golangci Lint (#676)
continuous-integration/drone/push Build is passing Details
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
konrad 0fb2edf051 Saved filters (#655)
continuous-integration/drone/push Build is passing Details
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
konrad bd8c1c3bb7 Return rights when reading a single item (#626)
continuous-integration/drone/push Build is passing Details
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
kolaente 11722bf029
Add update route to toggle team member admin status
continuous-integration/drone/push Build is failing Details
2020-08-05 17:21:17 +02:00
konrad dfb7730b63 More avatar providers (#622)
continuous-integration/drone/push Build is passing Details
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
konrad 1181039249 Duplicate Lists (#603)
continuous-integration/drone/push Build is passing Details
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
konrad d02d413c5e Sentry integration (#591)
continuous-integration/drone/push Build is passing Details
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
konrad a0ffe89056 List Background upload (#582)
continuous-integration/drone/push Build is passing Details
Add filesize check when uploading a new file

Fix error 500 if the uploaded background was not an unsplash one

Add upload background setting to info endpoint

Add config docs

Fix lint

Return list background type if it was uploaded

Add file upload

Add docs

Save uploaded backgrounds as file

Add background upload handler

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#582
2020-06-11 17:31:37 +00:00
kolaente 5a04f1ecf4
Add option to disable totp for everyone
continuous-integration/drone/push Build is passing Details
2020-05-29 17:15:59 +02:00
kolaente a0fb8bd32d
Add unsplash image proxy for images and thumbnails
continuous-integration/drone/push Build is failing Details
2020-05-29 15:33:46 +02:00
konrad e5e30d0915 List Backgrounds (#568)
continuous-integration/drone/push Build is failing Details
Return the updated list when setting a list background

Add swagger docs for unsplash methods

Add unsplash info to search results

Fix misspell

Fix lint

Add rights check for setting and getting backgrounds

Show unsplash information when loading a single list

Make application id for pingbacks configurable

Remove old backgrounds when setting a new one

Return 404 if the list does not have a background

Implement getting list backgrounds

Implement actually setting a photo from unsplash as list background

go mod tidy

Add migration for background file id

Roughly implement setting a list background from unsplash

Implement saving a background

Add migration for unsplash photo table

Add unsplash search

Fix parsing page param

Fix parsing page param

Fix background config

Add unsplash wrapper library

Add enabled background providers to info endpoint

Add config options for backgrounds

Add unsplash background provider

Add routing handler for backgrounds

Add basic background provider interface

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#568
2020-05-26 20:07:55 +00:00
konrad e89e6d47d4 Todoist Migration (#566)
continuous-integration/drone/push Build is passing Details
Add swagger docs + fix lint

Add parsing logic + fix fixtures

Fix test init

Add logging to creating labels and debug logs

Add creating labels when migrating

Finish test fixtures

Started adding fixtures for testing

Add method and test structures to convert todoist to vikunja

Add basic structure to migrate everything

Add all structs for todoist api

Add docs for config options

Add routes for todoist migrator

Add api token exchange

Add basic structure for todoist migration

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#566
2020-05-23 20:50:54 +00:00
konrad ecdecdd94e Kanban (#393)
continuous-integration/drone/push Build is passing Details
Fix tests

Add error docs

Add swagger docs for bucket endpoints

Add integration tests

Fix tests

Fix err shadow

Make sure a bucket and a task belong to the same list when adding or updating a task

Add tests

Add getting users of a bucket

Fix log level when testing

Fix lint

Add migration for buckets

Cleanup/Comments/Reorganization

Add Kanban bucket handling

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#393
2020-04-19 07:27:28 +00:00
kolaente 895d9613b5
Add endpoint to disable totp auth
continuous-integration/drone/push Build is passing Details
2020-04-18 01:38:49 +02:00
kolaente 87d0c9088d
Add endpoint to get the current users totp status
continuous-integration/drone/push Build is passing Details
2020-04-18 00:22:59 +02:00
konrad 24904585a2 Add 2fa for authentification (#383)
continuous-integration/drone/push Build is passing Details
Fix user tests

Add swagger docs

Fix lint

Add totp check when logging in

Make totp enrollment work

Add migration for totp table

go mod vendor

Add routes for totp routes

Add route handler for totp routes

Add basic implementation to enroll a user in totp

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#383
2020-04-17 19:25:35 +00:00
kolaente 1dca8e96a7
Add changing email for users
continuous-integration/drone/push Build is passing Details
2020-04-17 16:01:45 +02:00
konrad 584e3af237 Add proxying gravatar requests for user avatars (#148)
continuous-integration/drone/push Build is passing Details
Fix getting avatar based on email

Remove avatarUrl from user struct

Fix staticcheck

Add default avatar size

Add config option for caching avatars

go mod vendor

Add swagger docs

Add proxying gravatar requests for user avatars

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#148
2020-03-01 20:30:37 +00:00
konrad 1f039c4cda Task Comments (#138)
continuous-integration/drone/push Build is passing Details
Add swagger docs

Add integration tests

Add tests

Add task comment test fixtures

Add config option to enable/disable task comments

Add custom error if a task comment does not exist

Fix lint

Add getting author when getting a single comment

Fix getting comments/comments author

Add rights check to ReadAll

+ actually get the comment author

Add migration and table definitions

Add routes

Add ReadOne method

Add basic crud rights

Signed-off-by: kolaente <k@knt.li>

Implement basic crudable functions for task comments

Signed-off-by: kolaente <k@knt.li>

Start adding task comments

Signed-off-by: kolaente <k@knt.li>
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#138
2020-02-19 21:57:56 +00:00
kolaente 1f99238019
Update copyright header
continuous-integration/drone/push Build is passing Details
2020-02-07 17:27:45 +01:00
konrad 2abb858859 Add rate limit by ip for non-authenticated routes (#127)
continuous-integration/drone/push Build is passing Details
Add rate limit by ip for non-authenticated routes

Signed-off-by: kolaente <k@knt.li>

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#127
2020-01-26 19:53:47 +00:00
konrad fc65052ba0 Add config options for task attachments (#125)
continuous-integration/drone/push Build was killed Details
Add config options for task attachments

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#125
2020-01-26 19:10:31 +00:00
konrad b2b1546a8f Add config options for cors handling (#124)
continuous-integration/drone/push Build was killed Details
Add config options for cors handling

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#124
2020-01-26 19:09:54 +00:00
konrad 7e9446ea07 Refactor User and DB handling (#123)
continuous-integration/drone/push Build is passing Details
fix copyright date

Add more user tests

More user tests

More user tests

Start refactoring user tests

Docs

Fix lint

Fix db fixtures init in tests

Fix models test

Fix loading fixtures

Fix ineffasign

Fix lint

Fix integration tests

Fix init of test engine creation

Fix user related tests

Better handling of creating test enging

Moved all fixtures to db package

Moved all fixtures to db package

Moved user related stuff to seperate package

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#123
2020-01-26 17:08:06 +00:00
konrad 8c33e24e92 Migration Improvements (#122)
continuous-integration/drone/push Build is passing Details
Update swagger docs

Update docs

Let the wunderlist migrator use the registerRoutes function

Add migration status table

Add migration status

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#122
2020-01-20 19:48:46 +00:00
konrad 9e39399689 Migration (#120)
Go mod tidy

[skip ci] Add modules/migration to docs

[skip ci] update date

fmt

Merge branch 'master' into feature/migration

# Conflicts:
#	pkg/routes/api/v1/info.go

Add docs on how to create a migrator

Add available migrators to /info endpoint

Return a message once everything was migrated successfully

Add swagger docs for wunderlist migration

Docs for migration [skip ci]

Fix due date fixture in migration test

Fix staticcheck

Fix lint

Logging and cleanup

Make the migrator work with real data

Add routes for migration

Fix misspell

Add method to store a full vikunja structure into vikunja

Add getting all data from wunderlist

Add attachment migration from wunderlist

Add done and done at to wunderlist migrator

Add todo

Add wunderlist auth url implementation

Fix lint

Finish wunderlist migration

Added all structs for the wunderlist migratior

Fix owner field being null for user shared namespaces (#119)

Update copyright year (#118)

Add option to disable registration (#117)

Added migrator interface

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#120
2020-01-19 16:52:16 +00:00
konrad a0c5e4e985 Update copyright year (#118)
continuous-integration/drone/push Build is passing Details
2020-01-09 17:33:22 +00:00
konrad 62e550bf35 Add user token renew (#113)
continuous-integration/drone/push Build is passing Details
2019-12-07 19:52:04 +00:00
shilch e890001ee1 Consistent copyright text in file headers (#112)
continuous-integration/drone/push Build is passing Details
2019-12-04 19:39:56 +00:00
konrad 7e4deab8f7 Task collection improvements (#109)
continuous-integration/drone/push Build is passing Details
2019-12-01 13:38:11 +00:00
konrad d96831fe3a Endpoint to get tasks on a list (#108)
continuous-integration/drone/push Build is passing Details
2019-11-29 22:59:20 +00:00
konrad 9be5ab248c Add endpoint to get a single task (#106)
continuous-integration/drone/push Build is passing Details
2019-11-02 20:33:18 +00:00
konrad 8948a5f219 Improve pagination (#105)
continuous-integration/drone/push Build is passing Details
2019-10-23 21:11:40 +00:00
konrad 2169464983 Task Attachments (#104)
continuous-integration/drone/push Build is failing Details
2019-10-16 20:52:29 +00:00
konrad 8fe33fd616 Task Relations (#103)
continuous-integration/drone/push Build is passing Details
2019-09-25 18:44:41 +00:00
konrad 6140920cb8 Fixed rate limit panic when authenticatin with a link share auth token (#97)
continuous-integration/drone/push Build is passing Details
2019-09-08 19:11:42 +00:00
konrad 8d57923a7d Sharing of lists via public links (#94)
continuous-integration/drone/push Build is passing Details
2019-08-31 20:56:41 +00:00
konrad 66cdd79666 Refactor ListTask to Task (#92)
continuous-integration/drone/push Build is passing Details
2019-08-14 20:19:04 +00:00
kolaente 10fbbe1db6
Moved metrics init to seperate methods
continuous-integration/drone/push Build is passing Details
2019-07-21 23:44:12 +02:00
konrad 4327a559e5 feature/rate-limit (#91)
continuous-integration/drone/push Build is passing Details
2019-07-21 21:27:30 +00:00
konrad 48826a6ed7 Logger refactoring (#90)
continuous-integration/drone/push Build is passing Details
2019-07-20 18:12:10 +00:00
konrad 12eaddc8ee Added http endpoint to list all users on a list (#87)
continuous-integration/drone/push Build is passing Details
2019-07-18 16:38:21 +00:00
konrad e2d9de191d /info endpoint (#85)
continuous-integration/drone/push Build is passing Details
2019-07-15 22:54:38 +00:00
konrad 1f1a079fd3 Better config handling with constants (#83)
continuous-integration/drone/push Build is passing Details
2019-07-06 20:12:26 +00:00
konrad 7107d030fc Better caldav support (#73)
continuous-integration/drone/push Build is failing Details
2019-05-22 17:48:48 +00:00
konrad de24fcc2f8
Fixed metrics endpoint not working
continuous-integration/drone/push Build is passing Details
2019-05-12 16:49:16 +02:00