Commit Graph

154 Commits

Author SHA1 Message Date
chenos
449c307eb9 fix(database): add test cases 2022-02-23 22:27:08 +08:00
chenos
872ee79146 refactor(database): model toJSON without the hidden fields 2022-02-23 18:18:38 +08:00
ChengLei Shao
9dd590c459
fix Collection rest api (#205)
* test: collections rest api

* test: add more test cases

* fix: test case

* fix: Error: src/schema-component/antd/array-table/TableRecordActionDesigner.tsx(3,38): error TS2307: Cannot find module '@nocobase/client' or its corresponding type declarations.

* fix: belongsToMany create with empty value

* fix: relation query  test

* test: appends + sort

* fix: belongsToMany find error

* fix: add cleanDb to fix database test

* fix: mysql test

Co-authored-by: chenos <chenlinxh@gmail.com>
2022-02-22 23:38:13 +08:00
Junyi
46afc05898
Feat(plugin workflow): add more instructions (#201)
* test(plugin-workflow): add getter cases

* feat(plugin-workflow): add query type for node instruction

* feat(plugin-workflow): add crud instructions for node type

* fix(plugin-workflow): fix transaction

* fix(plugin-workflow): fix context data of model trigger
2022-02-20 21:23:39 +08:00
ChengLei Shao
351bb88245
fix: postgres array operator (#200) 2022-02-20 10:33:26 +08:00
ChengLei Shao
000587380b
fix: postgres sort with appends issue (#198)
* fix: postgres sort with appends issue

* fix: role menus api error

* feat: add exists params in roles.collections api

* refactor: remove uid field on uiSchemas table

* test: toggle role menus

* fix: plugin-acl test

* feat: sync data to acl before app start

* fix: mysql ui-schema sql compatibility

* feat: writeRolesToACL in plugin-acl
2022-02-20 01:23:04 +08:00
chenos
f7a30e4103 fix(database): export uid field options 2022-02-19 17:16:12 +08:00
ChengLei Shao
78e89b76ef
fix: option parser test (#195) 2022-02-17 17:41:30 +08:00
chenos
9c422b7879 fix(database): typings 2022-02-17 16:16:05 +08:00
ChengLei Shao
86e0f071e4
fix: nest append (#194) 2022-02-17 12:56:52 +08:00
ChengLei Shao
99bfd75776
fix: test with database (#193)
* fix: ui schema test

* fix: sqlite array query

* fix: acl test

* fix: plugin-users test

* fix: database test with postgres

* fix: test with db.getTablePrefix

* fix: test with mysql database

* fix: test with sqlite database

* fix: test with  mysql

* fix: test order with mysql

* chore: test clean database

* chore: mockServer clean

* chore: app cleanDb

* chore: plugin-users cleanDb
2022-02-15 22:32:02 +08:00
chenos
adfac15aba fix(database): parse sort 2022-02-15 17:36:32 +08:00
chenos
6bf416d5c4 fix(database): remove dropAllTables 2022-02-15 09:09:13 +08:00
chenos
c5f639338f refactor: mockDatabase 2022-02-15 00:20:25 +08:00
chenos
c538fdf73a fix(database): the options.where object is empty 2022-02-14 21:27:50 +08:00
chenos
db3285d452 fix(database): mock db 2022-02-13 13:41:17 +08:00
chenos
51ca12cc87 feat(plugin-china-region): improve code 2022-02-12 12:38:57 +08:00
ChengLei Shao
785077a6f3
fix: update guard with Model instance (#186) 2022-02-12 12:36:22 +08:00
chenos
c2725ac9ca fix(database): remove the setUpHooks method 2022-02-11 14:52:04 +08:00
chenos
695b953a8f fix(sort-field): the value of the scopeKey attribute is null 2022-02-11 14:50:53 +08:00
chenos
16d07e9b4a feat: add sortable parameter to collection options 2022-02-11 14:34:33 +08:00
Chareice
6013b4d274 feat: remove method 2022-02-11 09:43:45 +08:00
Chareice
3e1cad643b feat: server hooks model 2022-02-11 09:43:45 +08:00
chenos
7e76c54012 feat: using crypto.scrypt instead of bcrypt 2022-02-10 19:53:18 +08:00
ChengLei Shao
15950ece05
Application (#175)
* feat: getRepository

* getRepository return type

* export action

* add: acl

* feat: setResourceAction

* feat: action alias

* chore: code struct

* feat: removeResourceAction

* chore: file name

* ignorecase

* remove ACL

* feat: ACL

* feat: role toJSON

* using emit

* chore: test

* feat: plugin-acl

* feat: acl with predicate

* grant universal action test

* grant action test

* update resource action test

* revoke resource action

* usingActionsConfig switch

* plugin-ui-schema-storage

* remove global acl instance

* fix: collection manager with sqlite

* add own action listener

* add acl middleware

* add acl allowConfigure strategy option

* add plugin-acl allowConfigure

* change acl resourceName

* add acl middleware merge params

* bugfix

* append fields on acl action params

* acl middleware parse template

* fix: collection-manager migrate

* add acl association field test

* feat(plugin-acl): grant association field actions

* chore(plugin-acl): type name

* feat(plugin-acl): regrant actions on resource action update

* feat(plugin-acl): regrant action on field destroy

* fix(plugin-acl): test

* fix(plugin-acl): test run

* feat(plugin-acl): set default role

* feat(plugin-users): set user default role

* test(plugin-users): create user with role

* feat(plugin-users): create user with role

* feat(application): application hook

* feat(database): reconnect

* feat(database): application life cycle

* feat(database): sync with option

* feat(database): hook position

* feat(database): hook position

* feat(database): remove load in start

* fix(application): get plugin

* feat(test): loadAndInstall

* feat: improve code

* feat: improve code

* fix: listen options

* fix: bug

* test(database): add test case

Co-authored-by: chenos <chenlinxh@gmail.com>
2022-01-30 11:11:36 +08:00
ChengLei Shao
7a7ab2ef41
feat: add acl plugin (#169)
* feat: getRepository

* getRepository return type

* export action

* add: acl

* feat: setResourceAction

* feat: action alias

* chore: code struct

* feat: removeResourceAction

* chore: file name

* ignorecase

* remove ACL

* feat: ACL

* feat: role toJSON

* using emit

* chore: test

* feat: plugin-acl

* feat: acl with predicate

* grant universal action test

* grant action test

* update resource action test

* revoke resource action

* usingActionsConfig switch

* plugin-ui-schema-storage

* remove global acl instance

* fix: collection manager with sqlite

* add own action listener

* add acl middleware

* add acl allowConfigure strategy option

* add plugin-acl allowConfigure

* change acl resourceName

* add acl middleware merge params

* bugfix

* append fields on acl action params

* acl middleware parse template

* fix: collection-manager migrate

* add acl association field test

* feat(plugin-acl): grant association field actions

* chore(plugin-acl): type name

* feat(plugin-acl): regrant actions on resource action update

* feat(plugin-acl): regrant action on field destroy

* fix(plugin-acl): test

* fix(plugin-acl): test run

* feat(plugin-acl): set default role

* feat(plugin-users): set user default role

* test(plugin-users): create user with role

* feat(plugin-users): create user with role

Co-authored-by: chenos <chenlinxh@gmail.com>
2022-01-30 10:37:27 +08:00
chenos
6e95278ce4 fix(database): missing context in hook 2022-01-25 17:08:35 +08:00
ChengLei Shao
bd285e0ba9
Plugin acl (#166)
* feat: getRepository

* getRepository return type

* export action

* add: acl

* feat: setResourceAction

* feat: action alias

* chore: code struct

* feat: removeResourceAction

* chore: file name

* ignorecase

* remove ACL

* feat: ACL

* feat: role toJSON

* using emit

* chore: test

* feat: plugin-acl

* feat: acl with predicate

* grant universal action test

* grant action test

* update resource action test

* revoke resource action

* usingActionsConfig switch

* plugin-ui-schema-storage

* remove global acl instance

* fix: collection manager with sqlite

* add own action listener

* add acl middleware

* add acl allowConfigure strategy option

* add plugin-acl allowConfigure

* change acl resourceName

* add acl middleware merge params

* bugfix

* append fields on acl action params

* acl middleware parse template

* fix: collection-manager migrate

Co-authored-by: chenos <chenlinxh@gmail.com>
2022-01-24 14:10:35 +08:00
chenos
f0eb2eee20 feat: improve the params of the ctx.action 2022-01-23 12:42:35 +08:00
ChengLei Shao
f67658129f
Feat/plugin UI schema v0.6 (#143)
* v0.6

* plugin-ui-schema: insert && getJsonSchema

* plugin-ui-schema: insert schema with sort

* plugin-ui-schema: node with x-index

* insert adjacent method

* chore: insert

* typo

* insert with x-uid

* fix: getSchema by subtree

* add ui-schema actions

* fix: mysql compatibility

* remove ui-schema when remove node tree

* ui schema patch

* ui_schemas.create

* test cases

* test cases

* fix(database): reset changed before update

* feat: insert ui schema node after created

* feat:  patch ui schema node after updated

* fix: sqlite error

* uid

* cleanup

* test cases

* feat: ui_schema items type support

* fix: insert items node

* fix: get inner type

* change items struct

* add insert return value

* add insert return value

Co-authored-by: chenos <chenlinxh@gmail.com>
2022-01-19 10:09:30 +08:00
chenos
380b5e8c7a
Feat/plugin collection manager (#147)
* refactor: collection manager plugin

* feat(database): magic attribute model

* MagicAttributeModel

* load collections & fields options

* collections filterTargetKey
2022-01-19 10:02:52 +08:00
ChengLei Shao
fd32705954
feat: acl (#153)
* feat: getRepository

* getRepository return type

* export action

* add: acl

* feat: setResourceAction

* feat: action alias

* chore: code struct

* feat: removeResourceAction

* chore: file name

* ignorecase

* remove ACL

* feat: ACL

* feat: role toJSON

* using emit

Co-authored-by: chenos <chenlinxh@gmail.com>
2022-01-18 16:38:03 +08:00
ChengLei Shao
246737906d
Feat/GitHub actions (#148)
* test github actions

* mod: github actions

* mod: github actions

* fix: yarn build

* fix: database pk key error

* fix: test

* skip failed tests

* github test with sqlite && mysql

* fix: mysql query error
2022-01-08 17:16:11 +08:00
chenos
10d520c22a feat: customizable magicAttribute 2022-01-07 22:06:31 +08:00
chenos
103a170917 add test case for magic-attribute-model 2022-01-07 21:47:10 +08:00
chenos
ef6e2dd378 feat(database): magic attribute model 2022-01-07 20:26:23 +08:00
ChengLei Shao
2bf09bf9bb
feat: filter by target key (#146)
* feat: filter by target key

* fix: repository test

* change type name

* chore: test

* change PrimaryKey type to TargetKey

* rename filterTargetKey

* rename variables

* change option parser constructor

* add option parser targetKey

* change filter parser constructor

* fix: custom model

Co-authored-by: chenos <chenlinxh@gmail.com>
2022-01-07 20:08:01 +08:00
ChengLei Shao
79ba391aee
refactor: actions (#137)
* db test

* associated list action

* associated list action

* fix belongs to many repository test

* create action

* update action

* add update & destroy has one

* get action

* add action

* set action

* remove action

* toggle action

* chore: code import

* add sort field mutex

* change field mutex position

* feat: handle sort field scope change

* feat: sort actions

* fix: add action

* rename sort action to move action

* more actions params

* feat: repository destroy with filter and filterByPK

* feat: hasmany repository destroy with filter and filterByPK

* feat: belongsToMany repository destroy with filter and filterByPK

* fix: actions tests lock error

* feat: code cleanup

Co-authored-by: chenos <chenlinxh@gmail.com>
2021-12-16 16:46:54 +08:00
Chareice
8f0a71a1cf feat: collection autoGenId option 2021-12-16 10:58:51 +08:00
Chareice
9ff6575cff feat: filter with filterByPK 2021-12-12 19:57:20 +08:00
Chareice
90846686ac fix: update association value 2021-12-08 13:00:09 +08:00
chenos
f09991d932 feat: upgrade plugin-users 2021-12-08 09:10:44 +08:00
chenos
bf2840b089
feat: context field type support (#131)
* feat: context field type support

* fix: missing options
2021-12-07 21:19:28 +08:00
chenos
54f351af9d fix: plugin packages dependencies 2021-12-07 19:40:30 +08:00
chenos
17b5839f51 feat: upgrade plugin-notifications 2021-12-07 19:24:26 +08:00
Chareice
30e31a2e79 update options 2021-12-07 15:43:14 +08:00
Chareice
f6f8f041f1 Merge remote-tracking branch 'origin/nocobase-next' into nocobase-next 2021-12-07 15:29:50 +08:00
Chareice
feea1bef48 fix array field update 2021-12-07 15:29:32 +08:00
chenos
c56cd8674d feat: upgrade plugin-action-logs 2021-12-07 15:21:16 +08:00
chenos
732d31009e v0.6 2021-12-06 21:23:34 +08:00