Commit Graph

48 Commits

Author SHA1 Message Date
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 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 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 3b2289c8fa
Fix swagger docs
continuous-integration/drone/push Build is passing Details
2020-06-28 16:25: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 912abb3a10
Fix namespace title not being updated
continuous-integration/drone/push Build encountered an error Details
2020-06-26 00:03:28 +02:00
kolaente 525a547500
Remove min length for labels, lists, namespaces, tasks and teams
continuous-integration/drone/push Build is failing Details
2020-06-17 18:52:23 +02:00
kolaente 24c1098736
Fix resetting list, label & namespace colors
continuous-integration/drone/push Build is passing Details
2020-06-15 11:32:07 +02:00
konrad fe43173b6c Ensure consistent naming of title fields (#528)
continuous-integration/drone/push Build is passing Details
Remove task text and namespace name in migration

Fix lint

Add migration for namespace title

Fix renaming namespace name to title

Rename namespace name field to title

Drop text column at the end of the migration

Add migration for task text to title

Rename task text to title

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#528
2020-05-16 10:17:44 +00:00
konrad 587ce92dc9 Improve getting all namespaces performance (#526)
continuous-integration/drone/push Build is passing Details
Improve getting all namespaces performance

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#526
2020-05-15 15:10:22 +00: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
konrad 7b619bd084 Colors for lists and namespaces (#155)
continuous-integration/drone/push Build is passing Details
Add Hex Color properties migration

Add Hex Color properties

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#155
2020-03-22 21:09:32 +00:00
kolaente 0a1887d6e7
Fix archiving namespaces
continuous-integration/drone/push Build is passing Details
Signed-off-by: kolaente <k@knt.li>
2020-03-22 19:02:53 +01:00
kolaente 6132863f4a
Fix getting archived lists and namespaces
continuous-integration/drone/push Build is passing Details
Signed-off-by: kolaente <k@knt.li>
2020-03-22 18:24:54 +01:00
kolaente 26ffd2fd22
Fix getting one namespace
continuous-integration/drone/push Build is passing Details
Signed-off-by: kolaente <k@knt.li>
2020-03-21 13:55:42 +01:00
konrad 5126330a10 Add support for archiving lists and namespaces (#152)
continuous-integration/drone/push Build is passing Details
Add query param to get all lists including archived ones

Add query param to get all namespaces including archived ones

Fix getting lists by namespace only not archived lists

Fix misspell

Fix lint

Merge branch 'master' into feature/archive-lists-namespaces

Add docs for error codes

Fix archive error codes

Don't let archived lists show up in general lists

Fix updating description

Fix updating lists with link shares

More comments

Fix un-archiving lists

Move check for archiving a list to canWrite Check

Add more tests

Add more checks

Add checks for namespaces and lists

Add namespace edit

Add tests

Add migrations and filter

Add basic tests

Add is archived property to lists and namespaces

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#152
2020-03-15 21:50:39 +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
kolaente 1f99238019
Update copyright header
continuous-integration/drone/push Build is passing Details
2020-02-07 17:27:45 +01: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 1d2cdf0fb8 Fix owner field being null for user shared namespaces (#119)
continuous-integration/drone/push Build is passing Details
2020-01-09 19:24:08 +00:00
konrad a0c5e4e985 Update copyright year (#118)
continuous-integration/drone/push Build is passing Details
2020-01-09 17:33:22 +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 8948a5f219 Improve pagination (#105)
continuous-integration/drone/push Build is passing Details
2019-10-23 21:11:40 +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
konrad be14634e1e GetUser now returns a pointer (#93)
continuous-integration/drone/push Build is passing Details
2019-08-14 19:59:31 +00:00
kolaente 208eb4e68c
Fixed swaggerdocs of description fields
continuous-integration/drone/push Build is passing Details
2019-07-21 23:57:19 +02:00
konrad ef0e7c9769 Use longtext instead of varchar(1000) on description fields (#88)
continuous-integration/drone/push Build is passing Details
2019-07-18 19:56:34 +00:00
konrad b63928850a Simplify structure by having less files (#86)
continuous-integration/drone/push Build is passing Details
2019-07-16 14:15:40 +00:00
konrad 87873e53c5 Fix rights checks (#70)
continuous-integration/drone/push Build is passing Details
2019-04-01 19:48:48 +00:00
konrad be5a17e993 DB Migrations (#67)
continuous-integration/drone/push Build is passing Details
2019-03-29 17:54:35 +00:00
konrad eb4d38b5b8 Fixed rights check on lists and namespaces (#62)
continuous-integration/drone/push Build was killed Details
2019-03-08 21:31:37 +00:00
konrad 607dbd6ae8 API Docs improvements (#46)
the build was successful Details
2019-01-03 22:22:06 +00:00
konrad 0c1d786ade Exlicitly get the pseudonamespace with all shared lists (#32)
the build was successful Details
2018-12-04 10:16:42 +00:00
konrad 007d8ec375 Fixed generation of swagger docs (#29)
the build was successful Details
2018-12-01 01:59:17 +00:00
konrad ce2cae9430 Move the crudhandler to own repo (#27)
the build was successful Details
2018-11-30 23:26:56 +00:00
konrad 3f44e3b83e Change License to GPLv3 (#26)
the build was successful Details
2018-11-26 20:17:33 +00:00
konrad b73786f7fe Make validation less verbose (#24)
the build was successful Details
2018-11-25 21:38:50 +00:00
konrad d51ed8defd make validation less verbose (#23)
the build failed Details
2018-11-24 12:44:40 +00:00
konrad af0ce5bb96 Added Shared lists overview in namespaces (#21)
the build was successful Details
2018-11-19 11:37:59 +00:00
konrad 0c544fe355 Added validation for structs (#19)
the build was successful Details
2018-11-16 23:17:37 +00:00
konrad 373bbd2202 Migrate to new swagger docs generation (#18)
the build was successful Details
2018-11-12 15:46:35 +00:00
konrad d3de658882 Implemented search for everything (#17)
the build was successful Details
2018-11-09 17:33:06 +00:00
konrad d232836423 Added pagination (#16)
the build was successful Details
2018-11-09 10:30:17 +00:00
konrad 301a4eedda New structure (#7)
the build was successful Details
2018-10-31 12:42:38 +00:00