tachybase_todo/packages/plugin-permissions/src/collections/actions_permissions.ts
chenos 301229ef88
feat: route permissions (#58)
* feat: routes permissions

* fix: try to fix roles.pages action

* 多态关联

* bugfix

* fix: auto generate when option value is undefined or null

* feat: add pages' permissions saving/listing

* feat: add permission filter for getRoutes

* roles description

* feat: get root permissions all true and create user with default role

* feat: roles.collections list output with permission

* add permissions description

* fix: add context to parseApiJson

* fix: typo

* 小细节补充

Co-authored-by: mytharcher <mytharcher@gmail.com>
2021-01-22 10:18:02 +08:00

27 lines
534 B
TypeScript

import { TableOptions } from '@nocobase/database';
export default {
name: 'actions_permissions',
title: '表操作权限',
developerMode: true,
internal: true,
fields: [
{
comment: '程序操作名称("list", "create" 等)',
type: 'string',
name: 'name',
},
{
comment: '操作范围',
type: 'belongsTo',
name: 'scope',
target: 'actions_scopes'
},
{
type: 'belongsTo',
name: 'permission',
onDelete: 'CASCADE'
},
],
} as TableOptions;