Commit Graph

84 Commits

Author SHA1 Message Date
kolaente 349e6a5905
feat: rename lists to projects 2023-03-13 14:28:06 +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
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 4bb77b5539
fix(mail): don't set a username by default
continuous-integration/drone/push Build is passing Details
2022-07-12 11:49:23 +02:00
kolaente 30e0e98f77 feat: migrate away from gomail 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
kolaente f5ebada913
fix: set derived default values only after reading config from file or env
continuous-integration/drone/push Build is passing Details
2022-05-23 22:12:15 +02:00
kolaente 9845fcc170
fix: add more methods to figure out the current binary location
continuous-integration/drone/push Build is passing Details
2022-05-08 21:54:26 +02: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
kolaente 5cf263a86f
feat: upgrade golangci-lint to 1.45.2
continuous-integration/drone/push Build is failing Details
2022-03-27 16:55:37 +02:00
kolaente 22e3f242a3
fix: disabling logging completely now works
continuous-integration/drone/push Build is failing Details
2022-02-19 17:42:32 +01:00
kolaente 44aaf0a4ec
fix: clarify which config file is used on startup 2022-02-19 11:32:30 +01: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 df45675df3
Rearrange setting frontend url in config
continuous-integration/drone/push Build is passing Details
2021-05-28 08:46:31 +02:00
kolaente afd6bde74d
Make sure the configured frontend url always has a / at the end
continuous-integration/drone/push Build is passing Details
2021-05-28 08:39:27 +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
kolaente c4a71016b8
Update copyright year
continuous-integration/drone/push Build is failing Details
2021-02-02 20:19:13 +01:00
kolaente 9baf6d39bd
Change license to AGPLv3
continuous-integration/drone/push Build is failing Details
2020-12-23 16:41:52 +01: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
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 1c93aab7e0
Fix not loading timezones on all operating systems
continuous-integration/drone/push Build is passing Details
2020-06-30 09:55:46 +02:00
konrad 08205008e7 Migrate all timestamps to real iso dates (#594)
continuous-integration/drone/push Build is passing Details
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
kolaente c8605d6b3d
Enable upload backgrounds by default
continuous-integration/drone/push Build is failing Details
2020-06-23 22:53:23 +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 b8d7c97eb7
Add gosec static analysis
continuous-integration/drone/push Build is failing Details
2020-04-13 22:30:09 +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
kolaente e7706a20dd
Fix call to println
continuous-integration/drone/push Build is passing Details
Signed-off-by: kolaente <k@knt.li>
2020-04-02 21:38:16 +02:00
kolaente 6d1018e647
Fix searching for config in home directories
continuous-integration/drone/push Build is failing Details
Signed-off-by: kolaente <k@knt.li>
2020-04-02 21:13:42 +02: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