Commit Graph

13 Commits

Author SHA1 Message Date
Pascal Jufer
acd41eb0be Syntax fixes (#5367)
* Declare return types on functions

And a very few other type related minor fixes

* Minor syntax fixes

* Remove unnecessary escape chars in regexes
* Remove unnecessary awaits
* Replace deprecated req.connection with req.socket
* Replace deprecated upload with uploadOne
* Remove unnecessary eslint-disable-next-line comments
* Comment empty functions / catch or finally clauses
* Fix irregular whitespaces
* Add missing returns (null)
* Remove unreachable code
* A few logical fixes
* Remove / Handle non-null assertions which are certainly unnecessary (e.g. in
tests)
2021-04-29 12:11:43 -04:00
rijkvanzanten
909d184778 Respect permissions in item count
Fixes #4422
2021-03-12 14:53:41 -05:00
Nicola Krumschmidt
08293b8570 Update Knex to version 0.95.0 (#4374)
* Update Knex to version 0.95.0

* Fix formatting in schema dialects

* Fix Knex imports

* Update package-lock

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-03-03 19:37:44 -05:00
rijkvanzanten
3615612da0 Apply search to filter_count
Fixes #4121
2021-02-17 10:47:57 -05:00
Rijk van Zanten
b7d87e581a System permissions for app access (#4004)
* Pass relations through schema, instead of individual reads

* Fetch field transforms upfront

* Fix length check

* List if user has app access or not in accountability

* Load permissions up front, merge app access minimal permissions

* Show app access required permissions in permissions overview

* Show system minimal permissions in permissions detail

* Fix app access check in authenticate for jwt use

* Fix minimal permissions for presets

* Remove /permissions/me in favor of root use w/ permissions

* Fix logical nested OR in an AND

* Use root permissions endpoint with filter instead of /me

* Allow filter query on /permissions

* Add system minimal app access permissions into result of /permissions

* Remove stray console log

* Remove stray console.dir

* Set current role as role for minimal permissions

* Fix no-permissions state for user detail

* Add filter items function that allows altering existing result set
2021-02-11 12:50:56 -05:00
Nicola Krumschmidt
20a02f05bd Use knex instance property in MetaService class 2020-11-04 12:19:50 +01:00
Nicola Krumschmidt
8b601c5b60 Pass knex instance to applyFilter
This fixes a regression introduced in #786.
When using a SQLite database, items could not be updated any more.
This is due to knex by default only allowing a single connection for
SQLite databases and the item update operation using applyFilter inside
a transaction which tries to use a different knex instance to connect to
the database.
2020-10-28 00:33:53 +01:00
rijkvanzanten
febdd0adbd Attempt at resolving joins in nested where queries 2020-10-20 11:02:02 -04:00
rijkvanzanten
7f4c3b3d2a Emit events for system collections 2020-09-25 17:22:40 -04:00
rijkvanzanten
48fca55651 Restructure exports for services 2020-09-22 13:16:14 -04:00
rijkvanzanten
1ef278c717 Fix count on MySQL
Fixes #112
2020-08-11 19:23:43 -04:00
rijkvanzanten
06e926ad09 Rework meta service to class, add filter count support 2020-08-07 12:45:50 -04:00
rijkvanzanten
bde7069cce Move api into api subdirectory 2020-07-29 11:22:56 -04:00