Commit Graph

212 Commits

Author SHA1 Message Date
kolaente c4a71016b8
Update copyright year
continuous-integration/drone/push Build is failing Details
2021-02-02 20:19:13 +01:00
kolaente 657dcc5313
Fix lint
continuous-integration/drone/push Build is failing Details
2021-01-31 13:51:23 +01:00
kolaente 2d283b78c2
Fix the shared lists pseudo namespace containing owned lists
continuous-integration/drone/push Build is failing Details
2021-01-31 13:09:14 +01:00
kolaente 6bdc1fdb0d
Only send reminders for undone tasks
continuous-integration/drone/push Build is failing Details
2021-01-31 12:54:15 +01:00
kolaente d69c799197
Fix resetting the bucket limit
continuous-integration/drone/push Build is failing Details
2021-01-31 12:40:02 +01:00
kolaente e16c5f72ca
Fix setting the user in created_by when uploading an attachment
continuous-integration/drone/push Build is failing Details
2021-01-15 22:50:55 +01:00
konrad adf1172c39 Add tests for sending task reminders (#757)
continuous-integration/drone/push Build is passing Details
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
kolaente 456af4d4a9
Fix go header lint
continuous-integration/drone/push Build is passing Details
2020-12-29 02:04:20 +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 8d1a09b5a2 Use db sessions everywere (#750)
continuous-integration/drone/push Build is failing Details
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
kolaente fa68e89c04
Add task filters for kanban
continuous-integration/drone/push Build is passing Details
Signed-off-by: kolaente <k@knt.li>
2020-12-22 12:38:05 +01:00
konrad 2d4e2e452c Add task filter for lists and namespaces (#748)
continuous-integration/drone/push Build is passing Details
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
konrad 03e4bf30c2 Add task filter for labels (#747)
continuous-integration/drone/push Build is passing Details
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
konrad 18325e964d Add task filter for assignees (#746)
continuous-integration/drone/push Build is passing Details
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
konrad 92bcce3f7c Add task filter for reminders (#745)
continuous-integration/drone/push Build is passing Details
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
kolaente 90817b6dae
Add "like" filter comparator
continuous-integration/drone/push Build is passing Details
2020-12-19 13:56:55 +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 b0d4902406 Make sure all int64 db fields are using bigint when actually storing the data (#741)
continuous-integration/drone/push Build was killed Details
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
konrad 8d739b2cf9 Refactor adding more details to tasks (#739)
continuous-integration/drone/push Build is passing Details
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
kolaente ccfa019870
Don't create a list identifier by default
continuous-integration/drone/push Build is passing Details
2020-12-18 13:07:34 +01:00
konrad 00ed5884b4 Add support for migrating todoist boards (#732)
continuous-integration/drone/push Build is passing Details
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
kolaente e4de700a10
Simplify updating task reminders 2020-12-16 13:05:58 +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
kolaente 316ac0558b
Fix task updated timestamp not being updated in the response after updating a task
continuous-integration/drone/push Build is passing Details
2020-10-25 12:59:28 +01: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
kolaente b3d09cd2d4
Fix loading list background information for uploaded backgrounds
continuous-integration/drone/push Build was killed Details
Signed-off-by: kolaente <k@knt.li>
2020-09-28 20:53:17 +02:00
konrad 64d125afd9 Testing improvements (#666)
continuous-integration/drone/push Build is passing Details
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
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 6bdddd462a Favorite lists (#654)
continuous-integration/drone/push Build is passing Details
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
konrad e5559137dd Favorite tasks (#653)
continuous-integration/drone/push Build is passing Details
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
kolaente ecf09e17a8
Only check if a bucket limit is exceeded when moving a task between buckets
continuous-integration/drone/push Build is passing Details
2020-09-04 22:01:33 +02:00
konrad 14d706c91e Kanban bucket limits (#652)
continuous-integration/drone/push Build is passing Details
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
kolaente a58b932743
Work around tasks with attachments not being duplicated
continuous-integration/drone/push Build is failing Details
2020-08-16 23:44:16 +02:00
kolaente d192c36c39
Add better tests for namespaces
continuous-integration/drone/push Build is passing Details
2020-08-15 22:16:36 +02:00
kolaente 4a70c81b33
Make sure to require admin rights when modifying list/namespace users to be consistent with teams
continuous-integration/drone/push Build is passing Details
Signed-off-by: kolaente <k@knt.li>
2020-08-12 18:20:47 +02: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 6a82d4e2af
Fix updating team admin status
continuous-integration/drone/push Build is passing Details
2020-08-05 17:28:11 +02: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 e4539ef232 Use db sessions for task-related things (#621)
continuous-integration/drone/push Build is passing Details
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
kolaente 9acba7d3f0
Fix duplicating a list with background
continuous-integration/drone/push Build is passing Details
2020-07-17 14:16:59 +02:00
kolaente 2d567bfe0f
Make sure lists which would have a duplicate identifier can still be duplicated
continuous-integration/drone/push Build is passing Details
+ debug logging for duplicating lists
2020-07-17 13:26:49 +02:00
konrad 4db06ba9a1 Fix creating lists with non ascii characters (#607)
continuous-integration/drone/push Build is passing Details
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
kolaente f57b7e989f
Fix updating the index when moving a task
continuous-integration/drone/tag Build was killed Details
continuous-integration/drone/push Build is passing Details
2020-07-01 16:54:18 +02:00
kolaente 556ccd68c1
Set the list identifier when creating a new task
continuous-integration/drone/push Build is passing Details
2020-07-01 11:17:18 +02: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
kolaente 3b2289c8fa
Fix swagger docs
continuous-integration/drone/push Build is passing Details
2020-06-28 16:25:46 +02:00
kolaente 2820d92ab3
Expose namespace id when querying lists
continuous-integration/drone/push Build is passing Details
2020-06-27 23:00:15 +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 912abb3a10
Fix namespace title not being updated
continuous-integration/drone/push Build encountered an error Details
2020-06-26 00:03:28 +02:00