Commit Graph

144 Commits

Author SHA1 Message Date
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
chenos
11cded6153 chore: v0.5.0-alpha.34 2021-11-23 08:23:34 +08:00
chenos
3479b7ea27 chore: v0.5.0-alpha.33 2021-11-13 22:24:51 +08:00
chenos
7be6327458 chore: v0.5.0-alpha.32 2021-11-09 17:14:11 +08:00
chenos
7a35638eda chore: v0.5.0-alpha.31 2021-11-09 16:28:27 +08:00
chenos
829f969668 chore: v0.5.0-alpha.30 2021-11-09 13:07:41 +08:00
chenos
4ea7d74211 chore: v0.5.0-alpha.29 2021-11-08 23:06:31 +08:00
chenos
cce2253532 chore: v0.5.0-alpha.28 2021-11-08 22:54:19 +08:00
chenos
5cacee4e7f chore: v0.5.0-alpha.27 2021-11-08 20:47:20 +08:00
chenos
7611beea0f chore: v0.5.0-alpha.26 2021-11-08 20:27:59 +08:00
chenos
92f0a8265e fix: update dependencies 2021-11-08 20:17:46 +08:00