Commit Graph

49 Commits

Author SHA1 Message Date
Rijk van Zanten
a55d1bc4a7 Fix users accountability tracking (#7104) 2021-07-30 19:17:06 +02:00
Rijk van Zanten
92e1ee77bd Add support for Conditional Fields (#6864)
* Add conditions field to directus_fields

* Add conditions configuration

* Apply conditional overrides

* Handle conditions in nested groups

* Fix reverse mutating conditions

* Start on filter setup interface

* Move field types/constants to shared

* [WIP] Updated client side filter validation

* Support logical operators in client validation step

* Use new validation util in conditions check

* Add nesting in filter seutp

* Add filter rule setup configurator

* Fixes that should've been done in the merge

* Strip out filter-settings interface

TBD in a new PR

* Move browser to index
2021-07-26 18:02:24 -04:00
Adrian Dimitrov
efe7b076a3 Add default-folder option (#3209)
* Allow set folder for imported files

* Allow passing folder in file/files component; Allow pick folder for file/files/image interfaces.

* Added folder system component for picking folders; Move folder picker the field from data to interface (file, files, image).

* Add custom folder interface; use props for interfaces file/files/image in upload component

* Allow set folder for imported files

* Allow passing folder in file/files component; Allow pick folder for file/files/image interfaces.

* Added folder system component for picking folders; Move folder picker the field from data to interface (file, files, image).

* Add custom folder interface; use props for interfaces file/files/image in upload component

* Update after rebase

* Add storage_default_folder setting, use folder when deploy file

* Fix files options; Add default label option for folder interface.

* Fix set folder for file

* UX

* Add migration for column, undo seed change

* Update nomanclature

* Make sure file library always submits folder, cleanup setting retrieval

* Use indexName on down migrate

* Fix import default folder, rename customPresets->folderPreset

* Rename interface import

* Use undefined as default folder

* Remove deprecated lang file

* Fix display of folder interface, treat null as value

* Move shared composable

* Remove unused ref

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-07-21 17:29:21 -04:00
Tim
2c9ff3bca6 Allow custom transformations of assets (#6593)
* Allow custom transformations of assets

This exposes one query parameter `transforms`, which is a JSON array of
shard transformation operations.

It also updates the asset presets. The UX for this still needs some work

* Rename options to arguments for presets

More explicit

* options -> arguments in setting spec

* Better errors for invalid JSON in asset presets

* Add limit to transforms query parameter

* Use flattened option for extra transforms

* Fix placeholder color of code input

* Allow "simple mode" aliases

* Add documentation

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-07-21 15:57:47 -04:00
Rijk van Zanten
c79e682327 Add missing field for required app access (#6481)
Fixes #6475
2021-06-24 12:37:43 -04:00
Rijk van Zanten
0d899f097d Add ability to specify what fields to clone on "Save as Copy" (#6379)
* Start on tree-select component

* Stop propagation on label click as well

* Setup temp debug route

* Add value-combining=all

* Add branch mode

* Add leaf mode

* Add indeterminate state

* Add search

* Keep group state alive during search

* Fetch existing item based on clone fields data

* Add interface for setup

* Tweak field structure of m2a items

* Use collection name in checkbox

* Remove temp test
2021-06-18 16:37:27 -04:00
Rijk van Zanten
bc8370d084 Add item duplicate fields configuration option to directus_collections (#6140)
* Add item_duplication_fields field

* Add types for item duplicate fields
2021-06-08 17:57:28 -04:00
Oreille
22f2e4662f Add support for adding a collection accent color (#5818)
* Added icon_color to directus_collections
Added migrations
Added color property to select-icon
Fixed select-icon placeholder

* Use icon color in collection header bar.

* Set `collection` and `note` fields to hald witdh

* Rename icon_color->color

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-06-03 13:04:19 -04:00
Rijk van Zanten
9335372400 Foreign Key Constraints (#5615)
* Bump knex-schema-inspector

* Fix cli role name attr

* Update relation type

* Restructure relations

* Restructure relations table

* Update api type for relation record

* Fetch relations in new structure

* Update schema-inspector

* Use new relations schema structure in api

* Update relations GETters

* Add default value to one deselect

* Add create relationship on existing field

* Add updating existing relationship

* Add delete relations

* Add relations query resolver

* Add graphql mutations for relations

* Fix reading from wrong name

* Fix wrong method name

* No idea why this flip flops every install

* Update relation type

* Accept null in use-collection composable

* Use new relations structure in translations

* Use new relations structure in new-collection

* Start updating field detail store

* Renames for new relations structure

* Silently ignore passed collection/field in relation update

* Fix setting pk field in m2o relational setup

* Small tweaks in o2m setup

* Fix m2m setup

* Tweak m2o setup

* Fix m2a setup

* Allow null for related collection (m2a)

* Fix languages code name

* Fix migration default value

* Fix relational cleanup in collections/fields

* Fix transaction problem in field delete

* Fix inserting relational o2m items

* Don't execute updateByQuery on empty item set

Fixes #5710, fixes #5070

* Show referential action input on m2o

* Finish language for m2o

* Show triggers config on o2m

* Delete items on one_deselect_item delete

* Fix naming, show relational trigger config on m2m

* Tweak language, add setup to m2a

* Fix linter warnings

* Add trigger setup for translations

* fix Edit non-schema relationship issue

* Sync existing on_delete triggers in o2m setup

* Add migration to setup foreign key constraints

* Update illegal FK values before setting constraint

* Fix MySQL unsigned vs not-unsigned in FK creation

* Use pretty names for labels in relational triggers

* Prefix auto-junction when system table

Fixes #5493

* Add system foreign key triggers

Fixes #5749

* Update docs
2021-05-19 12:29:16 -04:00
rijkvanzanten
7b6bff1692 Use correct interface for collection module nav setup 2021-05-14 16:26:45 -04:00
rijkvanzanten
1ea544b261 Fix mfa-setup interface name 2021-05-14 16:10:19 -04:00
Rijk van Zanten
c4ae4b66cc Finalize interface names (#5521)
* Rename button-links->presentation-links

* Rename checkboxes->select-multiple-checkbox

* Rename code->input-code

* Rename checkboxes files

* Rename color->select-color

* Rename divider->presentation-divider

* Rename dropdown-multiselect->select-multiple-dropdown

* Rename hash->input-hash

* Rename icon->select-icon

* Rename image->file-image

* Rename m2a-builder->list-m2a

* Rename many-to-many->list-m2m

* Rename many-to-one->select-dropdown-m2o

* Rename markdown->input-rich-text-md

* Rename notice->presentation-notice

* Rename one-to-many->list-o2m

* Rename radio-buttons->select-radio

* Rename repeater->list

* Rename text-input->input

* Rename textarea->input-multiline

* Rename toggle->boolean

* Rename tree-view->list-o2m-tree-view

* Rename wysiwyg->input-rich-text-html

* Use correct interfaces in system defaults

* Rename collection->system-collection

* Rename collections->system-collections

* Rename display-template->system-display-template

* Rename field->system-field

* Rename interface->system-interface

* Rename interface-options->system-interface-options

* Rename scope->interface-scope

* Rename tfa-setup->system-mfa-setup

* Fix oversights

* Remove old todo

* Some more tweaks

* Add migration, fix dropdown name in system use

* Merge numeric + input

* Replace dropdown->select-dropdown in app use

* Merge slug->input, user->select-dropdown-m2o

* Fix type issue

* Fix seeder field name
2021-05-06 16:49:32 -04:00
rijkvanzanten
74861e6f81 Add default display template for directus_files
Fixes #5364
2021-04-29 20:40:52 -04:00
rijkvanzanten
801e868554 Fix remaining eslint errors
h/t @paescuj
2021-04-29 15:55:12 -04:00
Rijk van Zanten
84f4a1da01 Add singular/plural collection name translations (#5302)
* Add singular/plural options to collection translations

* Use singular/plural item names in related values

* Use singular / plural names on item detail

* Use singular/plural for drawer item

* Fix translation
2021-04-27 16:22:52 -04:00
Rijk van Zanten
f1e2338142 Add auth password policy / login attempts support (#5225)
* Check auth password policy on user modifications

* Show validation errors in drawer-batch

* Allow custom password policy, add placeholder

* Add UserSuspended exception

* Add user suspended error translation

* Move rate limiter creation into root helper

* Add login attempts support to authentication service

* Don't authenticate into settings service when checking password policy
2021-04-23 17:42:46 -04:00
Rijk van Zanten
40b9fb0fe6 Allow disabling activity/revisions (#5112)
* Add accountability column

* Add field info for accountability

* Add accountability to collection type

* Fetch accountability info from collection meta

* Add field name translation for accountability field

* Hide revisions drawer detail if revisions aren't available

* Only save activity where accountability flag matches

* Disable revisions for directus_presets

Fixes #3767

* Tweak field option naming
2021-04-16 16:26:18 -04:00
Rijk van Zanten
dd551f3571 Add non-items system Resolvers (#4863)
* Add auth resolvers

* Add password request/reset

* Add up until file import

* Make revisions read only

* Add server resolvers

* Add utils

* Add schema resolvers for schema manipulation
2021-04-06 18:04:35 -04:00
rijkvanzanten
9859212253 Fix o2m fields missing by default 2021-04-05 16:39:30 -04:00
Ben Haynes
ccf885f950 dynamic colors for system activity displays 2021-03-04 20:13:47 -05:00
Ben Haynes
275b9521f2 webhooks dynamic seed colors 2021-03-04 19:46:56 -05:00
Ben Haynes
7599e0a7aa primary color and various design updates 2021-03-04 18:50:47 -05:00
rijkvanzanten
1e89c25872 Remove "locked" field from directus_fields
Closes #3925
2021-03-04 18:41:59 -05:00
rijkvanzanten
31b5dbfe66 Fix validation error on preset creation with app access
Fixes #4369
2021-03-03 19:57:04 -05:00
Ben Haynes
83b1aa53c2 desaturate all system dividers 2021-02-26 11:32:52 -05:00
Rijk van Zanten
db30acbb8a Move sortField to relationship setup (#4304)
* Add migration

* Add sort field to relation types

* Remove sortfield options in favor of relationship

* Add sort field configuration to relational setup

* Save m2a sortfield on the correct row

* Add default sort field to system data
2021-02-25 19:13:36 -05:00
Adrian Dimitrov
335c3eab57 Update system fields default displays (#4089) 2021-02-16 13:44:26 -05:00
YannickMol
3bbf7f0d8b Add default displays to directus_users (#4069)
Fixes #3971
2021-02-15 16:27:03 -05:00
Nitwel
a589b9553c Make fields of files either readonly or hide them (#4053)
* make fields of file readonly to hinder confusion

* hide upload fields because duplication of information
2021-02-15 10:10:25 -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
Rijk van Zanten
693e770ca3 Make filename disk readonly (#3883)
Fixes #3863
2021-02-01 10:24:27 -05:00
Ben Haynes
9a9d0d9789 fix settings field defaults 2021-01-25 19:33:56 -05:00
Ben Haynes
36d5fafbf7 add default system divider color 2021-01-13 17:57:22 -05:00
rijkvanzanten
996e9f34ac Fix lang import, use system-languages interface on users 2020-12-08 13:39:50 -05:00
Igor Savin
7cddb458cb Run prettier across app and api 2020-12-08 02:22:00 +02:00
Nicola Krumschmidt
7a36dd3d0a Remove unused required properties 2020-12-01 18:51:27 +01:00
rijkvanzanten
0cdc85e607 Revert global width
Needs some more thinking / experimentation
2020-11-27 18:28:07 -05:00
rijkvanzanten
4f29681fa2 Fix lookup 2020-11-18 12:39:26 -05:00
rijkvanzanten
137fba838d Fix conceal on user 2020-11-12 18:22:04 -05:00
rijkvanzanten
982fa6aded Cast permissions validation as json
Should fix #965
2020-11-12 10:57:55 -05:00
rijkvanzanten
f1289a66dc Use csv of strings for permissions fields 2020-11-04 11:31:04 -05:00
rijkvanzanten
3a620fe1f8 Fix migrations reading .ts files 2020-10-30 15:50:00 -04:00
rijkvanzanten
d8339ae70d Merge branch 'main' into assets 2020-10-29 16:03:04 -04:00
rijkvanzanten
d21dfa74ba Add system fields for all collections 2020-10-29 15:42:26 -04:00
rijkvanzanten
9c04c92aa4 Add system flag to system rows 2020-10-29 14:51:05 -04:00
rijkvanzanten
0f729a5d6b Move preview defaults to app 2020-10-29 13:39:39 -04:00
rijkvanzanten
d3ca132fad Move system relations out of db 2020-10-29 13:29:07 -04:00
rijkvanzanten
ee9baf02c0 Move system fields out of DB 2020-10-29 13:06:37 -04:00
rijkvanzanten
23fd029687 Move system collection rows out of DB 2020-10-28 16:26:46 -04:00