Commit Graph

26 Commits

Author SHA1 Message Date
chenos
47fa83032c fix: build error 2022-02-10 18:38:05 +08:00
chenos
ab28a2be4c fix: missing app command args 2022-02-07 21:54:07 +08:00
chenos
851c97b52a fix(server): adjust the position of beforeInstall 2022-02-07 10:07:39 +08:00
ChengLei Shao
8e4336cbe1
feat(server): improve application (#177)
* feat: getRepository

* getRepository return type

* export action

* refactor(plugin-acl): plugin

* refactor(plugin-action-logs): plugin class

* refactor(plugin-china-region): plugin class

* refactor: plugin class

* fix: cli start command

* feat: pass install-command options into app.install

* fix: cli args

Co-authored-by: chenos <chenlinxh@gmail.com>
2022-02-07 01:14:00 +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
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
732d31009e v0.6 2021-12-06 21:23:34 +08:00
chenos
c2ff7882bc
feat: database next (#130)
* FIX: database test with sqlite

* more types

* filter test

* split filter parser

* filter test

* filter test: hasMany

* define inverse association for belongsTo & hasMany

* chore: console.log

* repository count method

* chore: Collection

* repository filter & appends & fields & expect

* repository: sort option

* chore: test

* add: test

* find & findAndCount

* chore: test

* database-next: update guard

* database-next: update guard associationKeysToBeUpdate

* chore: comment

* update-guard OneToOne Association

* has one repository

* support through table value

* belongs to many repository

* has many repository

* has many repository find

* fix: has many find and count

* clean code

* add count method

* chore: multiple relation

* chore: single relation

* repository find

* relation repository builder

* repository count

* repository count test

* fix test

* close db afterEach test

* sort with associations

* repository update

* has many repository: destroy

* belongs to many repository: destroy

* add transaction decorator

* belongs to many with transaction

* has many with transaction

* clean types

* clean types

* clean types

* repository transaction

* fix test

* single relation repository with transaction

* single relation repository with transaction

* fix: test

* fix: option parser fields append

* fix: typo

* fix: string type

* fix: import

* collection field methods

* cleanup

* collection sync

* fix: import

* fix: test

* collection update field

* collection update options

* database hook

* database test

* database event test

* update database event

* add async emmit mixin

* async model event

* database import

* fix: model hook type

* fix: collection event

* recall model.init on collection update

* skip redefine collection test

* skip collection model update

* add model hook class

* global model event support

* chore

* chore

* change utils import

* add field types

* database import

* more import test

* test case

* fix: through model init...

* bugfix

* fix

* update database import

* collection sync by foreachModel

* fix collection model sync

* update

* add field types

* custom operator

* sqlite array field

* postgresql array field

* array query escape

* mysql array operators

* date operators

* array field sqlite fix

* association operator

* date operator empty & notEmpty

* fix: fields import

* fix array field nested association

* filter parse prepare

* fix test

* string field empty

* add date operator test

* field option types

* fix typo

* fix: operator name conflict

* rename function

Co-authored-by: Chareice <chareice@live.com>
2021-12-06 21:12:54 +08:00
chenos
479f64f197
feat: support i18n (#99)
* feat: i18next

* multi language data

* feat(client): locale support

* en-US for collections

* us-EN for routes

* en-US for routes

* en-US for attachments

* feat: partial translations

* translation

* add AntdConfigProvider

* translation

* translation

* feat: translation

* feat: add translation

* fix: improve translation

* feat: improve translation

* fix: SyntaxError: Unexpected token ) in JSON at position

* typo

* feat: improve translation

* feat: improve translation

* feat: language settings can be saved on the server

* feat: lang option of init cli

* demo translation

* typo

* change address field to textarea

* address data

* feat: chart translation

* feat: chart translation

* improve translation

* signin,signup,signout...

Co-authored-by: Zhou <zhou.working@gmail.com>
2021-11-08 19:32:59 +08:00
ChengLei Shao
05ecb25d1b
feat: create nocobase app with simple & quickstart option (#87)
* feat: create nocobase app with simple & quickstart option

* chore: delete template file

* create-nocobase-app: add env API_PORT fallback

* chore: log

* env default fallback

* move config dir

* change has yarn

* chore: prettier

* fix: npm running issue

* database testing support sqlite

* once...

* chore: typo

* fix: sqlite test

* update readme

* feat: copy .env.example to .env at create-nocobase-app

* create-nocobase-app: change sqlite3 to github master

* create-nocobase-app: .env template

* create-nocobase-app: update .env

* chore: typo

* update README

* chore: Application constructor

* feat: sqlite demo data support

* fix test

* fix: application error

* chore: plugin-client run sql

* fix: application createCli

* fix: can choose whether to register actions

* chore: model compile error

* fix: support sqlite

* fix: demo data set index sequence on postgresql

* chore: code reduce

* fix: operators are compatible with sqlite

* add impor demo option to init command

* update env

Co-authored-by: chenos <chenlinxh@gmail.com>
2021-10-18 12:49:37 +08:00
chenos
29d386a63d feat: improve code 2021-10-01 23:31:49 +08:00
chenos
86e2a2802d feat: add useClient and useResourceRequest hooks 2021-09-28 18:20:21 +08:00
chenos
897169a613 feat: add saas plugin 2021-09-28 00:18:09 +08:00
chenos
27f6bde775 feat: improve code 2021-09-23 00:16:04 +08:00
chenos
17db8b8afb feat: docs & examples 2021-09-16 15:57:21 +08:00
chenos
b7eb720eb4 feat: improve code 2021-09-16 00:38:48 +08:00
chenos
248d59f6ec feat: improve code 2021-09-14 11:09:26 +08:00
chenos
3fa9e59093 refactor: improve server application 2021-09-09 13:05:33 +08:00
chenos
a1bb52759b refactor: add command support to the server 2021-09-05 23:59:38 +08:00
chenos
4886a8a3a0 feat: async event emitter 2021-09-05 14:17:45 +08:00
chenos
c74818049b refactor: plugin initialization 2021-04-01 09:58:30 +08:00
Junyi
bd756a6a5c
Feature: add permission plugin api (#57)
* fix: update method of permission

* 页面访问权限

* feat: add tabs update in role

* refactor: change main action permission check into single file

* feat: add pluginLoaded event listener for init page permissions

* refactor: change to can api

* refactor: use constants for role types

* refactor: can api

* 只处理 actions 表里的权限,其余跳过

* 注释掉 fields

* bugfix

* add: 详情模块编辑按钮权限判断

* test: add cases

* fix: add association permission judgment

* fix: add disabled property to drawer select

Co-authored-by: chenos <chenlinxh@gmail.com>
2021-01-20 08:33:47 +08:00
Junyi
c5f089d7b7
feat: add permissions plugin (#53)
* test: skip bug test cases for ci passing

* feat: add base structure of plugin-permissions

* fix: user token parsing

* Refactor action parameter for better mergeParams (#55)

* refactor: add parameter types to handle parameters in action [WIP]

* fix: action parameter

* fix: test cases

* test: try to fix build error

* remove unused packages

* fix: revert compatibility back

Co-authored-by: chenos <chenlinxh@gmail.com>

* 补充权限界面相关功能

* bugfix

* fix: developer mode does not work

* feat: add action scope and fields limitation in permission

* 改进权限配置表单

* feat: get/update action for role.collection

* add scope select component

* add role users tabs

* typings

* test: temp skip

Co-authored-by: chenos <chenlinxh@gmail.com>
2021-01-13 16:23:15 +08:00
chenos
6ffa3b53e8 refactor: add plugin manager 2020-12-18 19:54:53 +08:00
Junyi
110d5bcc9c
feat: add createdBy/updatedBy field config for table managed by collections (#43)
* feat: add createdBy/updatedBy field config for table managed by collections

* fix: update by different users and field initialization

* fix: function argument

* add: test cases

Co-authored-by: chenos <chenlinxh@gmail.com>
2020-12-18 09:04:40 +08:00
chenos
1023e317f3
fix #9 (#11)
* fix #9

* fix: database env variables
2020-11-12 11:48:27 +08:00