Commit Graph

74 Commits

Author SHA1 Message Date
kolaente 8dc6c95333
docs: update references to list
continuous-integration/drone/push Build is failing Details
2023-03-14 17:39:46 +01:00
kolaente da9d25cf72
feat: disable events log by default
continuous-integration/drone/push Build is passing Details
BREAKING CHANGE: events log level is now off unless explicitly enabled
2023-02-15 10:44:02 +01:00
konrad ef1d1e2b20 feat(migrators): remove wunderlist (#1346)
continuous-integration/drone/push Build is failing Details
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1346
2022-12-29 17:12:39 +00:00
viehlieb a79b1de2d0 feat: provide logout url for openid providers (#1340)
continuous-integration/drone/push Build is failing Details
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
yverry c83cb8480d nessecary is a common misspelling of necessary (#1304)
continuous-integration/drone/push Build is passing Details
Co-authored-by: Yann Verry <yann@verry.org>
Reviewed-on: vikunja/api#1304
Co-authored-by: yverry <yann_kolaente@verry.org>
Co-committed-by: yverry <yann_kolaente@verry.org>
2022-10-31 20:45:28 +00:00
kolaente 5a40100ac5
feat: provide default user settings for new users via config
continuous-integration/drone/push Build is passing Details
2022-10-02 11:00:58 +02:00
kolaente 2369ce5554
fix(docs): clarify using port 25 as mail port when mail does not work
continuous-integration/drone/push Build is failing Details
2022-09-05 17:32:48 +02:00
kolaente dbb0f54732
feat: add openid examples
continuous-integration/drone/push Build is passing Details
2022-08-09 10:48:50 +02:00
kolaente f30a9d1038 chore(docs): add new mailer option to docs 2022-06-30 14:21:17 +00:00
kolaente 2f25b48869
feat: restrict max avatar size
continuous-integration/drone/push Build is passing Details
resolves #1171
2022-06-12 18:29:12 +02:00
grahammiln acaa85083f feat: ability to serve static files (#1174)
continuous-integration/drone/push Build is passing Details
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
tuxthepenguin 4960a498ff Add client-cert parameters of the Go pq driver to the Vikunja config (#1161)
continuous-integration/drone/push Build is failing Details
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
konrad 1322cb16d7 feat: add long-lived api tokens (#1085)
continuous-integration/drone/push Build was killed Details
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
stephen-hill 82a3330412 Added the ability to configure the JWT expiry date using a new server.jwtttl config parameter. (#999)
continuous-integration/drone/push Build is passing Details
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
kolaente dcddaab7b5
Set todoist migration redirect url to the frontend url by default
continuous-integration/drone/push Build is passing Details
2021-08-14 18:27:29 +02:00
konrad 27119ad6d4 User account deletion (#937)
continuous-integration/drone/push Build is passing Details
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
andreymal 50b49ffab6 Add support of Unix socket (#912)
continuous-integration/drone/push Build is passing Details
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
kolaente b76ad8efe2
Add more logging and better error messages for openid authentication + clarify docs
continuous-integration/drone/push Build is passing Details
2021-05-16 13:23:10 +02:00
kompetenzbolzen 86b7d224ab Expose tls parameter of Go MySQL driver to config file (#855)
continuous-integration/drone/push Build is passing Details
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
kolaente 9dc72c5c98
Use golang's tzdata package to handle time zones
continuous-integration/drone/push Build is passing Details
2021-05-07 12:18:21 +02:00
kolaente 3999580fe6
Add basic auth for metrics endpoint
continuous-integration/drone/push Build is passing Details
2021-02-28 11:29:53 +01:00
konrad 0ab9ce9ec4 Add events (#777)
continuous-integration/drone/push Build is passing Details
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
konrad b2e4fde63a Add email reminders (#743)
continuous-integration/drone/push Build is passing Details
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
konrad f5b5204776 Add Microsoft Todo migration (#737)
continuous-integration/drone/push Build is passing Details
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
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
kolaente 90ae940a6b
Clarify docs about cors configuration
continuous-integration/drone/push Build is passing Details
2020-12-16 13:23:26 +01: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
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 d56a611be7 Key-Value Storages (#674)
continuous-integration/drone/push Build is passing Details
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
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
kolaente 41cf73a473
Add option to configure legal urls
continuous-integration/drone/push Build is passing Details
2020-07-18 18:53:56 +02:00
kolaente 092aae3260
Add config option to force ssl connections to connect with the mailer
continuous-integration/drone/push Build is passing Details
2020-07-14 17:30:39 +02:00
kolaente c8605d6b3d
Enable upload backgrounds by default
continuous-integration/drone/push Build is failing Details
2020-06-23 22:53:23 +02:00
kolaente f2025c2658
Fix sqlite path in default config
continuous-integration/drone/push Build is passing Details
2020-06-22 23:13:41 +02: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
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
kolaente cb095d70df
Add explanation to docs about cors
continuous-integration/drone/push Build is passing Details
2020-05-12 11:10:07 +02:00
kolaente 0bfb3a4709
Add configuration options for log level
continuous-integration/drone/push Build is failing Details
2020-04-12 22:32:21 +02:00
konrad d28f005552 Update xorm to v1 (#323)
continuous-integration/drone/push Build is failing Details
Fix limit for databases other than sqlite

go mod tidy && go mod vendor

Remove unneeded break statements

Make everything work with the new xorm version

Fix xorm logging

Fix lint

Fix redis init

Fix using id field

Fix database init for testing

Change default database log level

Add xorm logger

Use const for postgres

go mod tidy

Merge branch 'master' into update/xorm

# Conflicts:
#	go.mod
#	go.sum
#	vendor/modules.txt

go mod vendor

Fix loading fixtures for postgres

Go mod vendor1

Update xorm to version 1

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#323
2020-04-12 17:29:24 +00:00
funkythings 51c74de1de expand relative path ~/.config/vikunja to $HOME/.config/vikunja **WINDOWS** (#147)
continuous-integration/drone/push Build is passing Details
apply correct formatting

add quotes to make the yaml gods happy

log path of config file used by viper

resolve merge conflicts: windows compatible $HOME path

Prepare changelog & readme for 0.11 release

expand relative path ~/.config/vikunja to $HOME/.config/vikunja (#146)

update dependencies

expand relative path ~/.config/vikunja

Co-authored-by: Julian <juliangaal@protonmail.com>
Co-authored-by: konrad <konrad@kola-entertainments.de>

Co-authored-by: Julian Gaal <gjulian@uos.de>
Reviewed-on: vikunja/api#147
Reviewed-by: konrad <konrad@kola-entertainments.de>
2020-03-20 21:21:44 +00:00
konrad cdd068cdb6 Add empty avatar provider (#149)
continuous-integration/drone/push Build is passing Details
Fix lint

Add docs for avatar configuration

Add default avatar provider

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#149
2020-03-01 21:10:25 +00: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 021a715aff
Fix frontend url for wunderlist migration in docs
continuous-integration/drone/push Build is passing Details
2020-02-17 19:52:26 +01:00
konrad e95a6eeb11 Explicitly disable wunderlist migration by default (#141)
continuous-integration/drone/push Build is passing Details
Fix wunderlist callback link in docs

Explicitly disable wunderlist migration by default

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#141
2020-02-17 17:29:17 +00:00
jtojnar ce5be947b4 Add postgres support (#135)
continuous-integration/drone/push Build is passing Details
Revert fixture fixes for postgres

Use postgres connection string with spaces instead of url

Fix label order

Make postgres tests in ci less verbose

Add sequence update script

Skip resets in postgres

Remove option to skip resets in postgres

Make postgres tests in ci verboseq

Update test fixtures database

Fix file tests on postgres

Add postgres options to sample config

Make sure tests init test fixtures before running the actual tests

Fix issues with IDs too big to fit in an int

Fix duplicate auto incremented IDs

Refactor / Fix team tests

Refactor team member tests

Fix team member create

Fix label test

Fix getting labels

Fix test fixtures for postgresql

Fix connection string params

Disable ssl mode on postgres integration tests

Disable ssl mode on postgres tests

Use sprintf to create the connection string for postgresql

fixup! Add postgres support

Add postgres support

Added generate as a make dependency for make build

Clarify docs on building

Co-authored-by: kolaente <k@knt.li>
Co-authored-by: Jan Tojnar <jtojnar@gmail.com>
Reviewed-on: vikunja/api#135
2020-02-16 21:42:04 +00:00
konrad db2d868eed Return iso dates for everything date related from the api (#130)
continuous-integration/drone/push Build is passing Details
Remove traces of unix timestamp

Revert renaming reminder table column

Fix staticcheck

Remove unused table call

Add migration for renaming reminders table

Fix issues with using TimeStamp

Fix lint

Updated all created / updated fields to use TimeStamps

Add comments

Convert all created / updated fields to datetime

Add time util package

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#130
2020-02-08 12:48:49 +00:00