Commit Graph

2022 Commits

Author SHA1 Message Date
Yasser Lahbibi
3b5fb27fdf fix: cast translation strings as json (#12349) 2022-03-24 17:35:03 +08:00
rijkvanzanten
7b15947276 v9.7.1 2022-03-23 14:50:51 -04:00
Rijk van Zanten
9435573742 Fix auto-casting of array like values in env (#12330) 2022-03-23 11:59:34 -04:00
Rijk van Zanten
de152d1995 Fix inconsistent delete action payload (#12328)
Fixes #12326
2022-03-23 10:40:16 -04:00
rijkvanzanten
3d795236da Remove confusing warning 2022-03-22 11:26:36 -04:00
Azri Kahar
37cbaa0be5 Add App Translation Strings in Settings (#12170)
* add migration for translation strings

* add to navigation

* WIP

* fix dialog overflow

* update translation keys

* Update logic

* add placeholder to system-language

* fix translation

* remove unused import

* reset dialog on create new

* ensure search input is visible when searching

* merge translation strings on set language

* merge translation strings on update

* hydrate

* make sure null translation do not get merged

* change dialog to drawer

* update placeholder text

* fix form value

* revert dialog style change

* rename drawer component

* Force safe key name

* Move interface to system interfaces

The saved values are Directus app proprietary, so to prevent confusion in what it's supposed to do, we'll move it to system.

* Move composable to root composables

* Use new languages input in interface/display options

* hide translation strings field in project settings

* set system true to system-input-translated-string

* use this in field detail notes

* use in list options

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-03-22 09:39:04 -04:00
ian
e2eb2801c5 Prefix existing field typecasting flags with "cast-" (#12141)
* Prefix typecasting field flags

* Fix payload test

* Update flags for system tables and for field creation in app

* Revert cast-hash and cast-uuid

* Rename migrations file to current date
2022-03-21 14:46:48 -04:00
ian
ff3c99961c Fix incorrect order of migrations when reverting (#12130) 2022-03-21 14:29:15 -04:00
ian
72180f7027 Add query filter validation with permissions (#12190)
* Add query filter validation with permissions

* Allow all fields in test

* Revert test and add check for permissions with empty fields

* Add check for deep filters

* Add tests

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-03-21 18:19:37 +00:00
rijkvanzanten
c1da41d671 v9.7.0 2022-03-18 16:34:35 -04:00
Rijk van Zanten
2bb350f14f Fix nested relational limit for m2o fetching (#12235)
Fixes #12134
2022-03-18 16:27:25 -04:00
ian
5068ca096b Add lock for system cache (#12017)
* Add lock for system cache

* Add lock when forcing a flush

* Simplify code

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-03-18 15:54:02 -04:00
Azri Kahar
e6e129615e fix M2O field deletion (#11538)
* fix M2O field deletion

* fix lint

* fix for MySQL

* Pull final dropColumn out of transaction

* Forget that, check for existing constraint before deleting it instead

* Fix lint warning in unrelated file

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-03-18 15:36:50 -04:00
Rijk van Zanten
1c3e94d830 Add new export experience (#12201)
* Use script setup

* Start on export dialog

* Use new system field interface, replace limit with numeric input

* Set placeholder

* Add sort config

* Use folder picker, correct layoutQuery use

* Add local download button

* Allow writing exports to file

* Add notification after export

* Fix sort config, use new export endpoint

* Setup notification hints

* Add information notice

* Fix local limit, cancel button

* Add (basic) docs for export functionality

* Fix json export file format

* Implement xml batch stitching

* Resolve review points
2022-03-17 15:43:45 -04:00
ian
a79290e4a2 Export authorization service (#12208) 2022-03-17 08:52:42 -04:00
Azri Kahar
eb75912833 add cdn domain in CSP directives for in app docs (#12193)
* add cdn domain in CSP directives for in app docs

* fix images & videos placeholder width
2022-03-16 10:30:50 -04:00
Rijk van Zanten
73e6a12b98 Allow configuring overrides for the openid-client (#12088)
Resolves #11951
2022-03-11 09:45:55 -05:00
Rijk van Zanten
c1d705f94a Make sure mysql error extraction won't error on slice (#12087)
Fixes #12061
2022-03-10 17:29:56 -05:00
ian
7c91aa4278 Fix deep relational offset (#12076)
* Add relational offset

* Add offset tests

* Update relational test to use id

* Undo url change
2022-03-10 09:14:18 -05:00
Rijk van Zanten
6da3f1ed50 Add support for import ip deny list (#12025)
* Add support for import ip deny list

* Fix typo
2022-03-07 18:09:08 -05:00
Rijk van Zanten
826404bcbe Default CORS to disabled (#12022)
* Default CORS to disabled

* Update docs to match
2022-03-07 21:05:02 +00:00
Rijk van Zanten
a8df6d9653 Allow configuring /assets endpoint CSP separately (#12020)
* Allow configuring CSP for /assets seperately

* Document assets-csp config

* Remove double header
2022-03-07 15:41:13 -05:00
Spencer Jones
469f6400b7 add --dry-run flag to schema apply CLI command (#12006)
Co-authored-by: Spencer Jones <sjones@morningconsult.com>
2022-03-07 17:52:02 +00:00
Azri Kahar
0cd084ce67 fix query limit -1 for o2m queries (#12011) 2022-03-07 11:03:03 -05:00
rijkvanzanten
eba2576227 v9.6.0 2022-03-04 20:25:43 -05:00
Rijk van Zanten
eec21d8d9a Add "items.sort" event (#11954)
* Adds the 'sort_updated' event emit after items are sorted

Signed-off-by: Mihovil Ilakovac <mihovil.ilakovac@gmail.com>

* Updates the event name to 'sort_update'. Docs.

Signed-off-by: Mihovil Ilakovac <mihovil.ilakovac@gmail.com>

* Updates the event name to `sort`

* Add item/to to hook, fix docs

Co-authored-by: Mihovil Ilakovac <mihovil.ilakovac@gmail.com>
2022-03-04 19:58:47 -05:00
Lukas Kimpel
2312a0e20d Add check for filterPath length when not having m2o/a2o relation in order to add nested filters (#11768)
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-03-05 00:40:11 +00:00
rijkvanzanten
7145dfcd5c Fix migration for CRDB 2022-03-04 19:34:14 -05:00
Rijk van Zanten
6a3eb823c3 Update base theme of the App (#11952)
* Add migration to remove default value from project_color

* Upgrade the default theme

* Do a pass over the header buttons

* Do another pass over --warning uses

* Little things

* Tweak smoke

* Use updated map

* Use dark system elements in dark mode

* Remove outdated files, update toasts

* Use correct delete button style for role

* Use primary for created point

* Tweak spacing in revisions section

* Use primary for sidebar sections

* Various color tweaks and changes

* Update base color palette

* Update "css reset" code

* Remove splashscreens, add default favicon

* Add primary highlight to datamodel page

* dark mode color update

* fix sign out hover color

* Does this help?!

* This fixes some loading issues

Fixes https://github.com/directus/directus/issues/10707

* Calculate default pretty background?

* Fix public view with logo

* Fix responsiveness of login page

* adjust notification group width to be equal

* Do an absolute pointless task that doesn't do anything

It was suggested that it could fix the stylelint error in tests, but alas

* Remove stylelint

Doesn't seem to play nice with script setup and other changes

Co-authored-by: Ben Haynes <ben@rngr.org>
2022-03-04 18:53:39 -05:00
Rijk van Zanten
eea9f45624 Add authenticate hook to implement custom auth checks against current request (#11942)
* Add "authenticate" filter hook that allows custom auth check

* Start on test

* Update Jest, restructure API tests, start implementing authenticate test

* Move access token verify to util function

* Ensure jest can show inline warnings on correct lines

* Update is-directus-jwt to use jsonwebtoken decode + add tests

* Remove unused package

* Tweak and finish + test authenticate

* Tweak test

* Add authenticate filter to docs

* Don't scan tests for codeql

* No seriously, ignore tests
2022-03-03 16:29:13 -05:00
Azri Kahar
dec85f5659 add style to links in notice (#11925)
* add style to links in notice

* fix for stylelint

* unrelated: fix eslint warning for unused variables
2022-03-03 09:56:38 -05:00
Rijk van Zanten
962af79dbc Replace union query approach with updated table scan (#11246)
* Start by stripping out the previous Union attempt

* Then set limit to -1, causing massive memory issues on big data sets

* Now fix the memory problem by batching the responses

* Use env var for max relational batch size

* Rename env var, add to docs
2022-03-01 18:20:00 -05:00
Yt
dea674ad32 lockfile: regenerate to fix inconsistencies (#11646)
* update lockfile

* Regen lock-file another time

* Fix type issue from rollup package version

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-03-01 12:37:55 -05:00
Michael Lopez
c561826572 Support listen parameter (#11465)
* Support listen option for allowing server to listen on wanted IP address or host

* Change default listen value from localhost to 0.0.0.0

* Update LISTEN variable to HOST

* fix formatting

* Update docs/configuration/config-options.md

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-02-28 21:09:27 +00:00
Abdón Rodríguez Davila
e73cc4f773 Avoid get database when authenticate with JWT (#11617) 2022-02-28 18:43:23 +00:00
ian
bc45dd5f05 Empty {} supersedes other permissions/validations in _OR merge (#11554)
* Empty {} supersedes other permissions/validations in _OR merge

* Add unit test

* Fix typo

* Add a different conditional filter for comparison
2022-02-28 12:03:24 -05:00
José Varela
d4be6e0437 Add support to extend server properties (#11869) 2022-02-26 12:11:24 -05:00
Aiden Foxx
4b4a31ad55 LDAP handle posix groups (#11799)
* Simplified user fetching by passing EqualityFilter

* Simplified LDAP fetching and added posix user/group support

* Update api/src/auth/drivers/ldap.ts

* Renamed getAttribueValue to getEntryValue

* Update api/src/auth/drivers/ldap.ts
2022-02-23 15:48:14 -05:00
schlagmichdoch
dacce8e472 Fix anonymous binding ldap (#11750)
* fix anonymous binding ldap by correcting condition for throwing InvalidConfigException

* add anonymous bind option to docs

Co-authored-by: Dominik Tils <d.tils@studentec.de>
2022-02-23 15:47:59 -05:00
Azri Kahar
9148062247 fix permission for field functions (#11771) 2022-02-21 11:19:03 -05:00
rijkvanzanten
47a5da78fb v9.5.2 2022-02-18 11:45:07 -05:00
Abdón Rodríguez Davila
3de9bc1ada Update rollup-plugin-styles to v4 (#11689)
* Update rollup-plugin-styles to v4

* Update Rollup packages
2022-02-18 11:25:50 -05:00
Azri Kahar
eb2bb24141 validate first user email during installation (#11682) 2022-02-17 09:18:27 -05:00
ian
773ef6dda9 Prevent creation of relationships on primary keys (#11441)
* Prevent creation of relationships on primary keys

* Use schema instead of schemaInspector
2022-02-16 15:17:33 +00:00
ian
4fd26f2b60 Prevent selection of Foreign Keys for collection sort (#11444) 2022-02-16 09:40:01 -05:00
Aiden Foxx
40ec322998 Merge token claims and userinfo in openid flow (#11656)
* Merge token claims and userinfo in openid flow

* Keep linter happy
2022-02-15 17:54:59 -05:00
Oreille
c0fab454fd Explicitly set column nullable when unspecified (#11572) 2022-02-10 11:41:55 -05:00
ian
4a4b35b19a Add shares to app access minimum permissions (#11560) 2022-02-10 17:37:10 +08:00
Azri Kahar
5bfd424c2d fix directus_notifications permissions fields (#11525) 2022-02-08 16:27:54 -05:00
Nitwel
8af5ddfceb Fix not being able to delete folder in data-model (#11432)
* fix not being able to delete folder in data-model

* add e2e tests

* fix e2e tests

* fix e2e tests
2022-02-04 13:13:42 -05:00